We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fastjson用的1.2.59; 引用外部数据返回 { "id": "1233333333333333", "sign": "dfg/dfgdf/dfgdg/dfgdfg=", "value": "{"ttt":0,"aaaaa":0}", "status": "OK" } com.alibaba.fastjson.JSONObject resp = JSON.parseObject(res); //1 Map<String,Object> map = resp.getJSONObject("value");// 2 为什么序号2行 测试环境正常 ,生产环境会报java.lang.String cannot be cast to com.alibaba.fastjson.jsonobject; 两个环境配置一样(1.8.0_151),有人遇到同样情况没?
The text was updated successfully, but these errors were encountered:
仔细看了下,你的res输入是有问题的:
{ "id": "1233333333333333", "sign": "dfg/dfgdf/dfgdg/dfgdfg=", "value": "{"ttt":0,"aaaaa":0}", "status": "OK" }
[value]对应的值是非法的:【多了前后双引号】
"{"ttt":0,"aaaaa":0}"
应该是以下才对吧
{"ttt":0,"aaaaa":0}
Sorry, something went wrong.
No branches or pull requests
fastjson用的1.2.59;
引用外部数据返回
{
"id": "1233333333333333",
"sign": "dfg/dfgdf/dfgdg/dfgdfg=",
"value": "{"ttt":0,"aaaaa":0}",
"status": "OK"
}
com.alibaba.fastjson.JSONObject resp = JSON.parseObject(res); //1
Map<String,Object> map = resp.getJSONObject("value");// 2
为什么序号2行
测试环境正常 ,生产环境会报java.lang.String cannot be cast to com.alibaba.fastjson.jsonobject;
两个环境配置一样(1.8.0_151),有人遇到同样情况没?
The text was updated successfully, but these errors were encountered: