-
I can relate. But after using JSON for a while (in files that I edit by hand), I realised that I really wanted comments and trailing commas (which leads to https://nigeltao.github.io/blog/2021/json-with-commas-commen...). Next I'd probably want multiline strings (leading to https://github.com/json5/json5).
But if you use those extensions, all your tooling breaks.
I think the real bike-shedding would start when you want to add some syntax for raw string literals (e.g. heredocs); it's one of those features that feels redundant, until the day when you really need it and can't bear the pain of escaping.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
Maybe you'd like jsonnet: 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).
Dhall is also quite interesting, with some tradeoffs: 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
-
EDN (Extensible Data Notation) is a subset of Clojure: https://github.com/edn-format/edn
It is:
- Streamable
- Extensible
- Whitespace-insensitive, but there are formatting conventions for readability
-
-
Related:
just few days ago I crafted together some ideas i had couple of years already for a configuration language, syntactically like HCL but without HashiCorps idiosyncrasies.
Here it goes, BCL (_Basic_ Configuration Language, for a lack of better name yet), Go prototype, I can code Python port and possibly several other as well..
https://github.com/wkhere/bcl
-
-
The more applications I write, the more I tend to avoid typical config files in favor of using direnv [0] to set environment variables.
[0] https://direnv.net/
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
Maybe you'd like jsonnet: 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).
Dhall is also quite interesting, with some tradeoffs: 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
-
Maybe you'd like jsonnet: 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).
Dhall is also quite interesting, with some tradeoffs: 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
-
Maybe you'd like jsonnet: 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).
Dhall is also quite interesting, with some tradeoffs: 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
-
But the whitespace handling involved is an extra complication, at least the provided example fails to be parsed by `tomli`, which is following the currently release TOML spec: https://github.com/hukkin/tomli/issues/199
-
I wrote one of the Go implementations [0] when TOML was announced and have maintained it since.
As a library implementor, I wish arrays would hold only one type at a time, but I get that could be useful for users. But as a user, I wish tables were fully defined once (more can't be added up later in the file), especially when using larger files.
[0]: https://github.com/pelletier/go-toml