使用 fastjson 解析嵌套的 json 数据
2018-02-24 17:19
411 查看
假设现在有这样一个 JSONObject
通过这种方式即可获取 area 的值
{ "data": { "is_admin": false, "app_id": 10, "user": { "id": "2xxxxx", "phone": "186xxxxxx", "area": "beijing", "is_active": "1", "is_admin": false, } }, "expire": 18000 }
System.out.println(responseJson); String username = String.valueOf(responseJson.getJSONObject("data").getJSONObject("user").get("area"));
通过这种方式即可获取 area 的值
相关文章推荐
- Android中Json数据解析(二)--使用Gson、Jackson和FastJson解析Json数据
- java使用FastJson解析Json数据
- 使用fastJSON解析HashMap中的数据
- Spring Boot 完美使用FastJson解析Json数据
- 如何使用fastJson来解析JSON格式数据和生成JSON格式数据
- 使用FastJson解析Json数据
- 使用Gson和FastJson解析JSON数据遇到的问题
- 78. Spring Boot完美使用FastJson解析JSON数据【从零开始学Spring Boot】
- (4)Spring Boot完美使用FastJson解析JSON数据【从零开始学Spring Boot】
- JSON数据之使用Fastjson进行解析(一)
- 使用fastjson解析json数据
- 如何使用json-lib解析有2层嵌套的list数据,然后放到对应的bean中
- 使用FastJson解析Json数据
- Spring Boot使用FastJson解析JSON数据的方法
- Android中Json数据解析(二)--使用Gson、Jackson和FastJson解析Json数据
- 如何使用fastJson来解析JSON格式数据和生成JSON格式数据
- 使用jQuery解析嵌套JSON数据
- 使用FastJson解析Json数据
- 解析Json数据:使用FastJson进行解析json数据<三>
- 使用FastJson解析Json数据