JSONObject jsonObject = new JSONObject(s);
然后用Iterator迭代器遍历取值,建议用反射机制解析到封装好的对象中JSONObject jsonObject = new JSONObject(jsonString); Iterator iterator = jsonObject.keys();while(iterator.hasNext()){ key = (String) iterator.next(); value = jsonObject.getString(key);}