I know that JSON standard says key of object should be surrounded by double quotation marks. for example, {"key1": "value"}.
I want to parse string of "{key: "value"}" to object. notice that there isn't double quotation marks at key. I tried to parse the expression and i can't parse it. but JSON2(by crockford) does
Since the key does not have double quotation marks, it is not valid JSON, and thus JSON 3 will not parse it. JSON 2 does not ensure the text passed in is valid and will be able to parse it as it uses eval.
I know that JSON standard says key of object should be surrounded by double quotation marks. for example,
{"key1": "value"}
. I want to parse string of"{key: "value"}"
to object. notice that there isn't double quotation marks at key. I tried to parse the expression and i can't parse it. but JSON2(by crockford) does