Why do so many tools have JSON config filesโฝ Commenting why options have been set the way they have is just such a basic thing to want to doโฆ Why do tech people have such an aversion to writing things downโ
โฆ
@johy๐ฆฅprofilefollowreplied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
This is like the third time in my life I've seen an interrobang in the wild.
And I don't know, but I'd prefer JSON over having configuration as constants in a PHP script like at $DAYJOB sob
@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.replied to@johy๐ฆฅprofilefollow:
Ok, that sounds significantly worse, but like, YAML and TOML exists peopleโฆ
@keitachikawa๐profilefollowaeres-u99 on github, CodeAtlas \o/replied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
My problem with yaml is the indentation annoyance it leads to, and if you are using the same tool on two different machine like windows and linux, have fun configuring those tabs and spaces all the time. I do like toml and ini for editing, but json is not as bad as yaml for sure
@brunoborges๐profilefollowreplied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
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
@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.replied to@brunoborges๐profilefollow:
Thatโs really cool. I suppose it would allow people to verify their config file is valid without having to pass it to in the intended program, which might be running in production or infeasible to run locally โ very interesting
@brunoborges๐profilefollowreplied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
Exactly! The schema also enables tools to have rich editors to config files without having to know about the config file format upfront. There is an editor for TOML Schema as an example, on the website.
@turndownthenightprofilefollowreplied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
I don't know:
They should be using YAML:
- That's for sure