字符串、json、Object 在Java中的互相转换

String returnStr;
JSONObject jsonObj = JSONObject.fromObject(returnStr);
Object object = jsonObj.get("data");
JSONObject jsonObject = JSONObject.fromObject(object);
String city = jsonObject.get("city").toString();

猜你喜欢

转载自blog.csdn.net/weixin_42114804/article/details/84873000