env=staging
db=0.0.0.0
#descriptive comment
etc=true
11–20 of 78 posts
env=staging
db=0.0.0.0
#descriptive comment
etc=true
TOML is a better format for configuration files IMO, if not for many reasons, primarily because TOML accepts comments. However, one annoying thing for TOML was the lack of schema, and the reliance on JSON Schema for that. Which I decided to tackle years ago when I started the TOML Schema project. In the past few months I leveraged code agents to take to the finish line and got something compelling: tomlschema.org
JSON is obviously a poor choice. It's job is to interchange data, produced and parsed by computers. ESR had the idea of writing configuration in English. It didn't gain traction at the time, but we have LLMs now. It might be a good idea to revisit the idea of accepting plain english. The LLM output could then be any format that's easy and unambiguous to parse.
It fits into the poor choices we made, <-- Parse error
every format/structure that has numbers, strings, booleans, null/none, finite lists of items, and string-indexed records of items already contains JSON
and that's pretty much the barebones you need for a configuration language
(of course you can argue about the syntax)
because JSON is in the following sense "universal": every format/structure that has numbers, strings, booleans, null/none, finite lists of items, and string-indexed records of items already contains JSON and that's pretty much the barebones you need for a configuration language (of course you can argue about the syntax)
TOML is a better format for configuration files IMO, if not for many reasons, primarily because TOML accepts comments. However, one annoying thing for TOML was the lack of schema, and the reliance on JSON Schema for that. Which I decided to tackle years ago when I started the TOML Schema project. In the past few months I leveraged code agents to take to the finish line and got something compelling: tomlschema.org
because JSON is in the following sense "universal": every format/structure that has numbers, strings, booleans, null/none, finite lists of items, and string-indexed records of items already contains JSON and that's pretty much the barebones you need for a configuration language (of course you can argue about the syntax)
because JSON is in the following sense "universal": every format/structure that has numbers, strings, booleans, null/none, finite lists of items, and string-indexed records of items already contains JSON and that's pretty much the barebones you need for a configuration language (of course you can argue about the syntax)
Lack of comments is pretty big though for a human editable config .
1) JSON is pretty darn good for storing configuration. Everything speaks it, and a pretty printed one is very readable/tweakable in a pinch.
2) If you insist that someone manually edit a significant amount of it, you kinda fucked up.
Just my opinion, but it feels like two separate things.
Because XML hasn't been cool for about two decades. And suggesting .ini would you laughed out of the room into retirement.