{ "a": [], "ac": [], "es": [], "s": {}, "fs": {}, "l": "N", "rows": [{ "actN": "1111", "1h1": "11111", "1111": "111111", }, { "actN": "1111", "1h1": "11111", "1111": "111111", }}
8 回答
慕莱坞9220042
TA贡献377条经验 获得超508个赞
你好,举个例子看下:
String s = "{\"name\":\"JSON\",\"age\":\"24\",\"address\":\"北京市西城区\"}"; JSONObject json = new JSONObject(s); System.out.println(json.get("name"));
上图输出为:JSON;
先将json字符串转成对象,然后通过key取出对应的值。
添加回答
举报
0/150
提交
取消