3 ms·
If it just had comments, trailing commas, and didn't require quoting names, I could forgive the brace matching. Really shortsighted.
by MichaelGG 9y ago
If it just had comments, trailing commas, and didn't require quoting names, I could forgive the brace matching. Really shortsighted.
- mercer 9y agoI don't know about the other stuff, but I sort of see why comments were not supported: https://news.ycombinator.com/item?id=3912149 https://news.ycombinator.com/item?id=3912149 Personally I do miss them tremendously though.
- captainmuon 9y agoSome implementations allow comments. There is a project called JSON5 that also allows trailing commas, and maybe omitting quotes for keys. I have some (private) libraries in C++, Python, and Nim that support those features, too. Basically it understands JavaScript object literals. If I find some time, I'll package them up and publish them. One thing I'd really like to change is to make the parser round-trippable, so it remembers all the whitespace and comments, and if you use these pseudo-json as config files, you can make programmatic changes without loosing anything.