title: GWT: Dealing with incoming JSON string
body: <p>I am working on a GWT app that is receiving a JSON string, and I'm having a hard time getting down to the values of each object. I'm trying to transfer the incoming JSON string into an array of objects. </p>
  
  <p>Here is the JSON (from Firebug response tab), The "d" is a .NET thing (Web Service Being Consumed is C#.</p>
  
  <pre><code>{
      "d": [
          {
              "__type": "Event",
              "ID": 30,
              "Bin": 1,
              "Date": "\/Date(1281544749000)\/",
              "Desc": "Blue with white stripes.",
              "Category": "1"
          },
          {
              "__type": "Event",
              "ID": 16,
              "Bin": 3,
              "Date": "\/Date(1281636239000)\/",
              "Desc": "Yellow with pink stripes",
              "Category": "1"
          }
  
      ]
  }
  </code></pre>
  
  <p>I'm trying to parse the JSON into objects, and then insert them into an array. I'm able to use <code>Window.alert</code> and get the entire "d" object to echo. However, when I try to access the elements of the array, GWT debugger just crashes.</p>
  
  <pre><code>//My GWT array to receive JSON Array
  ArrayList&lt;Item&gt; itemInfo = new ArrayList&lt;Item&gt;();
  
  //Getting response JSON into something I can work with.(THIS FAILS) 
  JSONArray jsonValue = JSONParser.parse(incomingJsonRespone);
  
  //Just trying to verify I'm getting values 
  for (int i=0; i&lt;jsonValue.size(); i++) {
      JSONValue jsonItem =  = JsonValue.get(i).getString();
      Window.alert(jsonItem);
      itemInfo.add(jsonItem);
  </code></pre>
  
  <p>}</p>
  
  <p>I think I have narrowed down the problem to where the <code>JSONArray</code> instance is being created. Is there something blatantly wrong with how I'm trying to do this, because I'm not getting much help in the way of error messages? </p>