Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> JSON should actually have the same issue. When I enter { 013: "11" } in the web console I get '{11: "11"}'.

JSON doesn't have this issue. `{ 013: "11" }` isn't valid according to the JSON spec for a couple reasons, the important one being that multi-digit numbers cannot start with zero[1]. Try this in the console: `JSON.parse('{"11": 013}')`.

[1]: https://tools.ietf.org/html/rfc8259#section-6



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: