Live data from Hacker News

Why do so many tools have JSON config files?

textlog.cc

1–10 of 78 posts

Re: Why do so many tools have JSON config files?

#2
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

Re: Why do so many tools have JSON config files?

#5
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.

Re: Why do so many tools have JSON config files?

#6

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

Reading and writing json is so much easier than reading or writing toml imo

Re: Why do so many tools have JSON config files?

#7
> Why do so many tools have JSON config files‽

1: Because JSON is a very easy serialization format to work with. I suspect these tools all have configuration classes / objects that are deserialized straight from the config file.

2: I suspect a lot of these tools are written in Javascript, and in Javascript JSON is very easy to work with.

Re: Why do so many tools have JSON config files?

#8
post #5

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.

Absolutely not. We do not want a stochastic program without any actual understanding of the schema to be interpreting config data.

Re: Why do so many tools have JSON config files?

#9
post #4

Somewhat off topic, but Oracle database connection strings seem to be a form of Lisp. It makes me wonder why they would choose that.

Let me guess... if they're a form of Lisp, did someone add jndi support, then made it possible to print to the console while the string gets read and finally made it executable because who wouldn't want a LISP for-loop in an Oracle connection string? On to the next RCE...

Re: Why do so many tools have JSON config files?

#10
post #5

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.

> The LLM output could then be any format that's easy and unambiguous to parse.

Thats the problem isnt it? LLMs arent deterministic. Terrible for prod

Post reply on HN