title: Parsing multiple json objects in java
body: <p>I have this json file that I'm trying to parse in my program.</p>
  
  <pre><code>{
    "items": [{
          "0": {
            "item_name":"Test Item",
            "item_rarity":2,
            "item_material":"STICK",
            "required_level":1,
            "min_damage":100.0,
            "max_damage":200.0,
            "item_set":"The cool kids",
            "attributes":[{"name":"lifesteal","modifier":20}]
          },
            "1": {
              "item_name":"Test Item",
              "item_rarity":2,
              "item_material":"STICK",
              "required_level":1,
              "min_damage":100.0,
              "max_damage":200.0,
              "item_set":"The cool kids",
              "attributes":[{"name":"lifesteal","modifier":20}]
          }
    }]
  }
  </code></pre>
  
  <p>I am printing the JSON string, but instead of getting the individual objects (0, then 1, then 2, etc...) it only gets the whole array every time I print it out.</p>
  
  <pre><code>Object obj = jsonParser.parse(new FileReader(new File(ValaCraft.getInstance().getDataFolder() + "/test.json")));
              JSONObject jsonObject = (JSONObject) obj;
  
              JSONArray items = (JSONArray) jsonObject.get("items");
              for (int i = 0; i &lt; items.size(); i++) {
                  JSONObject item = (JSONObject) items.get(i);
                  System.out.print(item.toString());
              }
  </code></pre>
  
  <p>Anybody have an idea on how to parse this file (without GSON, attributes is a custom class and I found it complicated to use the auto parse that gson comes with).</p>