I use a JSON library called JSONObject (I don\'t mind switching if I need to).
JSONObject
I know how to iterate over JSONArrays, but when I parse JSO
JSONArrays
Maybe this will help:
JSONObject jsonObject = new JSONObject(contents.trim()); Iterator keys = jsonObject.keys(); while(keys.hasNext()) { String key = keys.next(); if (jsonObject.get(key) instanceof JSONObject) { // do something with jsonObject here } }