好吃力,多个双引号都解码不了。
|
1
|
|
2
@Livid 试了下,浏览器显示
There was an error parsing the JSON document. The document may not be well-formed. 遇到错误就不解析了,直接返回原始字符串 |
|
yangqiFeb 28, 2014
4
感觉可能是多余的换行或者是编码问题
|
|
rankjieFeb 28, 2014 via iPhone
5
复制粘贴到浏览器调试工具,var a = YourJSON;
然后看报错的地方就是了 |
|
6
|
|
zhujinliangFeb 28, 2014 via iPad
7
看看规律然后用正则提取,无视json规则
|
|
8
|
|
10
@icedx 用的你说的第一种,yajl(https://github.com/lloyd/yajl)。 因为我没在 Windows 环境下,就没试第二种了。感谢!
yajl的缺点是出错地方的上下文还是少了点。 lexical error: invalid string in json text. 3":[{"group":"ARTS"}, {"names (right here) ------^ JSON is invalid |