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);
}

 

posted on 2016-01-05 07:16  garfieldtom  阅读(74271)  评论(1编辑  收藏  举报