4 ms·
Exactly, so just use JSON for configuration. This will upset the people that have not yet learned to get over it, but you really need people that got over it.
by incrudible 3y ago
Exactly, so just use JSON for configuration. This will upset the people that have not yet learned to get over it, but you really need people that got over it.
- BiteCode_dev 3y agoI do this, but regularly get annoyed with the date, comment, trailing comma, mandatory key quotes, etc
- retzkek 3y agoMaybe you'd like jsonnet: https://jsonnet.org/ https://jsonnet.org/ I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev https://tanka.dev). Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/ https://dhall-lang.org/ A few years ago I did a small comparison by re-implementing one of my simpler ansible playbooks: https://github.com/retzkek/ansible-dhall-jsonnet https://github.com/retzkek/ansible-dhall-jsonnet
- paulddraper 3y agojsonnet is turing complete. It's configuration with a build step. Which is an option, but that's pretty different than JSON, YAML, TOML, etc.
- BiteCode_dev 3y agoIf I have to use a better format, I will use toml or cue. The whole point of the parent is that JSON is the Pareto solution, which I agree with. But it does grind my gear.
- baq 3y agoJSON is the runner up on the top crap list right below Windows Registry.
- remram 3y agoNo comments means it's not human friendly.
- incrudible 3y agoI would strongly advise against using JSON to configure humans.
- remram 3y agoThat's a first, the ol' HN switcharoo?