Hacker News new | past | comments | ask | show | jobs | submit login

> Trailing commas and JSON comments are are already supported in the newer browsers (try the Chrome console for instance).

Version 49.0.2623.112 (64-bit)

    > JSON.parse('{"foo": "bar",}')
    > VM124:1 Uncaught SyntaxError: Unexpected token }
Javascript object literals != JSON. JSON is a restricted subset of JS object literals (and not actually a strict subset: a JSON string can contain unescaped U+2028 "LINE SEPARATOR" and U+2029 "PARAGRAPH SEPARATOR" codepoints, a Javascript string can not)



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

Search: