Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
yepperino
on Aug 20, 2016
|
parent
|
context
|
favorite
| on:
Fixing JSON
Unquoted keywords are valid ES5.1 object properties.
alert(JSON.stringify({delete: "me", for: 1, var: 2}));
results in:
{"delete":"me","for":1,"var":2}
The only browser it does not work in is IE8 and earlier.
lucian1900
on Aug 26, 2016
[–]
JSON significantly predates ES 5.1
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: