fastjson JSONPath.eval()取值报异常

gmol1639  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(37)

String jsonStr = "{"appUrl":"","wxUrl":"","h5Url":""}";
JSONObject jo = JSONObject.parseObject(jsonStr);
String value = null;
value = (String) JSONPath.eval(jo,"$.wxUrl.Link");
// 输出结果
System.out.println(value);

avwztpqn

avwztpqn1#

jsonStr = "{
"h5Url":"",
"appUrl":"",
"wxUrl":{
"Link":"xxx"
}
}"

相关问题