项目场景一:
获取:id
{
"code": "success",
"data": {
"user": {
"id": "6286f2c0-6399-11ec-800b-f7f07b836bd8",
},
"exp": 1667880458
}
}
解决方案:
通过JSONObject解决
String id = object.getJSONObject("user").getString("id");
项目场景二:
获取:code
{"http_code":200,"code":"0","message":"SUCCESS"}
解决方案:
通过JSONObject解决
JSONObject.getString("code");