JSON Parse Error Using jQuery.parseJSON

后端 未结 4 1750
情深已故
情深已故 2020-12-12 04:29

This code fails with an exception indicating invalid JSON:

var example = \'{ \"AKEY\": undefined }\';
jQuery.parseJSON(example);

I was able

4条回答
  •  無奈伤痛
    2020-12-12 04:48

    Correct. Undefined and functions are not represented in JSON. http://www.json.org/js.html

提交回复
热议问题