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⁇
@swiley🤔profilefollowswiley.net
Try my zero dependency agent harness: public.swiley.net/agent.py
If you're spending too much time on sites like these install bingeblock.comreplied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
json.loads makes it all other people's problem.
@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
@rickyprofilefollow#Automationnotesfollow specialist for #CreditUnionsnotesfollow; 20+ year #SharePointnotesfollow veteran; #developernotesfollow; #writernotesfollow. I don't idle well.replied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
A lot of tech folks resist documentation because they think it provides them with job security. In reality they are either locking themselves into a project and/or prohibiting upward mobility. I don't want to work with folks who don't document.
@javisrikeprofilefollowSoftware • maker projects • music • DIY
Mostly figuring things out as I go.replied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
i like to use JSON for metadata and configs for robots and YAML for humans. if there is a need for a human to read the file there needs to be support for annotations
@gruntprofilefollowI am just a grain of sand on your beach.replied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
Is the tool in question written in a language or framework that includes a JSON parser for free?
If so, you have your answer already.
@ovrflwprofilefollowreplied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
I think it's mostly because JSON is a widely supported format.
@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