FASTJSON 解析 字符串 错误

hisben 发布于 2016/02/29 10:46
阅读 3K+
收藏 0

@wenshao 你好,想跟你请教个问题:

你好 使用 FASTJSON 解析 字符串 错误 com.alibaba.fastjson.JSONException: syntax error, position at 18, name place  经排查发现 问题在json 域 place  字符串18的位置 ":" 问题,求解答,谢谢
{"total":1,"rows":[{"state":"closed","id":"2c90e9f9531b77c301531b7a485a0001","heartRate":"120","bloodPressure":"120","rpe":"10","painLevel":"8.00","sickName":"计天和","period":"0","stationId":"0","isfinish":"Y,Y,,,,,,,,,,,,,","place":"[{"left":"51.83772233983162px","top":"68.83772233983161px","width":"6.324555320336759px","height":"6.324555320336759px","radius":"3.1622776601683795px","bgcolor":"#FF0000"}]","visitCount":"","identityCard":"11000019790225207X","boxClass":"","amount":"","createName":"管理员","createDate":"2016-02-26 10:49:49.0","processState":"2"}]}

加载中
2
花花兽
花花兽

http://tool.oschina.net/codeformat/json

json格式都不对,怎么解析

0
wenshao
wenshao
json格式不对
0
南湖船老大
南湖船老大
json格式都不对
0
13123123
13123123
Parse error on line 15:
...       "place": "[{"left":"51.8377223398
-----------------------^
Expecting '}', ':', ',', ']'

解析部队 检查字符串

0
蓝水晶飞机
蓝水晶飞机

String place = jsonData.rows.place;

你的json字符串里面有双引号",但是么有转义符号呢。

{

place:"{ \"property-1\" : \"value-1\" }"

}


0
Kylin_Shaw
Kylin_Shaw

找到你的place节点。:时候多了双引号,记得首尾两端都去掉。

"place": [{"left":"51.83772233983162px","top":"68.83772233983161px","width":"6.324555320336759px","height":"6.324555320336759px","radius":"3.1622776601683795px","bgcolor":"#FF0000"}],



返回顶部
顶部