Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
aepiepaey
on June 21, 2018
|
parent
|
context
|
favorite
| on:
YAML: probably not so great after all (2017)
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
on June 22, 2018
[–]
Thanks. 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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: