JWCC: JSON With Comments & (Trailing) Commas
Published
The HN thread above from a ~month ago is on JSON5, which extends the JSON spec. It’s a rather weird name: it’s not the fifth version of JSON, but a naming convention akin to ES5 (ECMAScript 5) which is the version1 that introduced trailing commas in the first place.
I think it’s cool, but adds more than I’d really want, which is really just comments and trailing commas. Others in the thread agree and link to some relevant things:
- Tailscale’s HuJSON which is “Human JSON” and implements the JWCC extension
- Visual Studio Code uses JSONC (JSON w/ comments) which is proprietary yet well adopted given the popularity of VSC
- There’s also Hjson which adds comments and commas along with being able to (sometimes) omit quotes and do multiline strings
Albeit this situation is resembling XKCD 927.
I believe technically it was ECMAScript 5.1.↩︎
I love hearing from readers so please feel free to reach out.
Reply via email • Subscribe via RSS or email
Last modified #programming