logoalt Hacker News

teddyh12/09/20241 replyview on HN

I always thought that “JSON5” is a deceptive name. It is not the fifth version of JSON; it is an alternative/extension of JSON, of which there are many alternatives, and this one is no more official than any other.


Replies

Zamicol12/09/2024

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.

show 1 reply