4 ms·
The web console is not a JSON parser. To check if something parses as JSON in the web console you should use JSON.parse, e.g: JSON.parse('{ 013: "11" }') wh
by aepiepaey 8y ago
The web console is not a JSON parser. To check if something parses as JSON in the web console you should use JSON.parse, e.g:
JSON.parse('{ 013: "11" }')
which should produce a syntax error (as already mentioned by siblings to this comment).
- bhaak 8y agoThanks. Yeah, I had mistakenly the believe that JSON is mostly a Javascript hash, not that 'JSON is valid Javascript' which means it's a subset of all possible Javascript hashes.