4 ms·
It’s a bit lesser known but I’m a fan of HOCON (human optimised config object notation). https://github.com/lightbend/config/blob/master/HOCON.md https://github
by overgard 8y ago
It’s a bit lesser known but I’m a fan of HOCON (human optimised config object notation). https://github.com/lightbend/config/blob/master/HOCON.md https://github.com/lightbend/config/blob/master/HOCON.md
If that’s not an option I’d prefer xml (with some sadness). JSON is a bad idea for the reasons described in the article, and YAML is too clever for its own good and is definitely a loaded foot-gun.
- 75dvtwin 8y agoHOCON is great. It can be incorporated into many programming languages. And it supports inheritance, includes, overriding of environment variables and so on. I think that this library found a very good compromise between configuration and programmability. In configuration files you want overrides, includes, comments and inheritance. May be very very simple pattern matching. Yet, you do not want flow control structures such as if-statements/loops & gotos.