3 ms·
Since I started using Clojure, all my configs have become EDN (https://github.com/edn-format/edn https://github.com/edn-format/edn), which is what JSON is to Ja
by didibus 8y ago
Since I started using Clojure, all my configs have become EDN (https://github.com/edn-format/edn https://github.com/edn-format/edn), which is what JSON is to JavaScript. And it is awesome.
So I can't see why JSON would be a bad choice either.
There are some things in EDN missing in JSON, richer types, can be extended by the user and support for comments mostly. I'm not sure if not having those would be a deal breaker though.
I've used YAML for some things, and I haven't found it better. In fact, it's annoying to have a different syntax for your config then you do for your code. And the whitespace matters definitly has been a source of frustration.
- donpdonp 8y agoEDN is fantastic, though I havent used it in a project in a long time. If there's one thing JSON (and numerous programming languages in general) can learn from EDN is that whitespace is the ideal seperator in lists. Commas are an anti-pattern that adds its own level of management (hence the trailing comma issue) that can be sidesteped entirely.
- dunham 8y agoYeah, I really like EDN for configuration. It is a nice sweet spot between JSON (too much syntactic noise to be human friendly) and YAML (human friendly, but much harder to parse).