Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The only 2 things I'd like to add in JSON are trailing commas and comments, and this is already supported in most JSON configs (.eslintrc, .babelrc, ..), it's called JSONC I believe


To each their own, but I find mandatory quoted keys a pain in the ass, and once you change those three things you're basically at JSON5.


I kind of wish Apple hadn't deprecated NeXT-style property lists and had instead gone in the direction of GNUstep by trying to improve the classic format.



Another name for this is JWCC. IMO very good argument for this feature set here:

https://nigeltao.github.io/blog/2021/json-with-commas-commen...


Note that that page forgets to actually make an argument against unquoted keys.

The "Why not JSON5, JSONC #1, HJSON or HOCON instead?" answer says it's because of "unquoted strings", then links to a section that only talks about unquoted values. JSON5 doesn't have unquoted values.


A native set type would be nice too, and the syntax for it is obvious— comma separated values like a list, but enclosed in braces like a dict.


A set is just a list with a uniqueness constraint. JSON already has a list type.


Proper support for dates too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: