net.sf.json.JSONObject转对象

请求接口返回net.sf.json.JSONObject对象 打印出来为
json字符串,想要取出mobile的数据。

{
"result":{
"id":"4239898975",
"login_name":"zgshfp_15731669367",
"login_password":"33fc535f8d7bf02cb5d072970afdefca",
"mobile":"15731669367"
},
"message":"查询成功",
"statusCode":200
}

JSONObject json= JSONObject.fromObject(userInfo.get(“result”));
String mobile = String.valueOf(json.get(“mobile”));
net.sf.json.JSONObject转对象_第1张图片

你可能感兴趣的:(net.sf.json.JSONObject转对象)