5 ms·
I really wished json5 would support optional commas as well. If you have a new line, no comma needed. So you can do [ 1 2 3 ] New lines used by humans, co
by nojvek 8y ago
I really wished json5 would support optional commas as well. If you have a new line, no comma needed. So you can do
[
1
2
3
]
New lines used by humans, computers should do a good job as well.
- spankalee 8y agoThat's not a subset of JavaScript though.
- adamkruszewski 8y agoIt looks very like an s-expression. Maybe we should go back to Lisp for our data encoding? (and to our code when we are at it? ;))
- Sean1708 8y agoLike https://hjson.org/ https://hjson.org/?
- spiralx 8y agoWell you could use CSON, which uses CoffeeScript notation that allows for constructs such as: required: [ 'firstName' 'lastName' ] which is the same as: { "required": [ "firstName", "lastName" ] } in JSON :)