title: How do I tokenize array of json objects?
body: <p>Hi I need to tokenize an array of json objects but I'm not sure how to go about doing that. </p>
  
  <p>Currently, I have this snippet: </p>
  
  <pre><code>StringTokenizer tokenizer = new StringTokenizer(request, "{}:,\"");
  Map&lt;String, String&gt; properties = new HashMap&lt;String, String&gt;();
  while(tokenizer.hasMoreTokens()) {
      String key = tokenizer.nextToken(); 
      String value = tokenizer.nextToken();
      properties.put(key, value);
  }
  </code></pre>
  
  <p>This snippet allows me to tokenize a regular (non-complex) json object so that I can get the value using the key as the lookup. However, it does not work for complex objects in the form like <code>[{"Foo":"Bar", "XYZ":12}, {"ABC":16, "Foo": "Bar"}...]</code></p>
  
  <p>So I was wondering how can I tokenize an array of json objects? </p>