logoalt Hacker News

Zamicol12/09/20241 replyview on HN

JSON5 is from ECMAScript 5.1, which is called ES5.

As an (unfortunate) JavaScript developer, it was clear to me the intent was to "update" JSON with ES5 features, and not say ES4 or ES6.

Why ES5? ES5 is when trailing commas were introduced. Commas are one of defining features of JSON5. Other languages, like Go, also made this a priority.


Replies

teddyh12/09/2024

The name may have a logical reason for being what it is. But it is still misleading. I have seen people implicicly assume that JSON5 is what they should be using instead of JSON, just because of the name.