各种百度说这个错误是因为json格式不标注引起的
这是后端php 用json_encode函数生成的json
看了jquery的官方文档似乎没错
jQuery.parseJSON( json )
Passing in a malformed JSON string will result in an exception being thrown. For example, the following are all malformed JSON strings:
{test: 1} (test does not have double quotes around it). 译:test两边必须有双引号 {"test":1}
{'test': 1} ('test' is using single quotes instead of double quotes). 译:test两边的引号不能为单引号,一定要是双引号
Additionally if you pass in nothing, an empty string, null, or undefined, 'null' will be returned from parseJSON. Where the browser provides a native implementation of JSON.parse, jQuery uses it to parse the string. For details on the JSON format, see http://json.org/.
而且以前一直都是这么返回的都没有出错,请问那么正确的json标准格式应该是怎样的?
皈依舞
沧海一幻觉
UYOU