by pveierland · 3y ago · 0 comments
Personally, I really hope Human JSON, https://github.com/tailscale/hujson , will get more popular!
https://www.freecodecamp.org/news/comments-in-json/
They were removed from the standard because some were using them for custom parser directives.
Who wants to type `{name: "pveierland"}` when you could just do `{name "pveierland"}`?!
`{num 5, val 4}` looks fine to me, but we can do even better! We already know objects/maps are always in pairs, so we don't really need that comma either. Just do `{num 5 val 4}` and we save yet another unnecessary characters.
Of course, I didn't come up with this format myself, what I actually want JSON to be is EDN (https://github.com/edn-format/edn) which is a standalone format but also directly used in Clojure, so it already exists inside a programming language and works very well. There keys are strings though, so you example would end up being `{"num" 5 "val" 5 "person" var}`, where commas are optional.