Hacker News new | ask | show | jobs
by Anaminus 2108 days ago
JSON5 pretty much addresses all the problems with JSON as a config format. I'd love for it to just replace JSON entirely.

https://json5.org/

2 comments

Generally looks good, but ugh, I dislike allowing single quotes. Allowing single quotes has close to zero ergonomic value but increases the number of ways to write the same fundamental thing.

But that's a minor quibble. If everyone adopted this thing instead of legacy JSON, we'd be better-off.

Having two ways to quote is a useful feature, not just one way to do the same thing.

Javascript already has this, so allowing single quotes simplifies copypasting object literals, which is a common use case.

That looks really nice. I might start using it for configuration.