6 ms·
The malformed example given is: {foo: "bar"} which is missing the quotes around foo so it should be: {"foo": "bar"} Since both of those would have h
by almost 17y ago
The malformed example given is:
{foo: "bar"}
which is missing the quotes around foo so it should be:
{"foo": "bar"}
Since both of those would have had the same meaning the JSON spec sensibly restricts things so that only one is valid. See http://json.org/ http://json.org/ for the (very short and readable) spec.