JSonObject json = new JSonObject(yourdata);String statistics = json.getString("statistics");JSonObject name1 = json.getJSonObject("John");String ageJohn = name1.getString("Age");
为了以动态方式获取这些项目:
JSonObject json = new JSonObject(yourdata);String statistics = json.getString("statistics");for (Iterator key=json.keys();key.hasNext();) { JSonObject name = json.get(key.next()); //now name contains the firstname, and so on... }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)