title: Looping through gson object in Java?
body: <p>I'm currently working on an Android application that gets a JSON response from a website called CloudMine. Their responses are typically in this format:</p>
  
  <pre><code>{
      "success": {
          "key1": { "field": "value1" },
          "key2": { "field1": "value1", "field2": "value2" }
      },
      "errors": {
          "key3": { "code": 404, "message": "Not Found" }
      }
  }
  </code></pre>
  
  <p>I currently want to loop through all the objects in the "success" object so I can access the different fields in each object. However, I've only been taught how to use the JsonParser from the gson API. The closest I got was using the names() method on the success object but Eclipse yelled at me because the method is undefined for this type. </p>
  
  <p>I appreciate all the help that anyone can give me.</p>
  
  <p>Thanks!</p>