frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Why do so many tools have JSON config files?

https://textlog.cc/post/895
14•stagas•59m ago

Comments

brunoborges•47m ago
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

bakies•37m ago
Reading and writing json is so much easier than reading or writing toml imo
leni536•32m ago
Interesting. The website says that it's "validation-focused". I don't know how that plays out for TOML, but the lack of focus in json schema to define an interface in addition to validation can be very frustrating. Most of the time I would rather trade off some expressitivity in terms of validation in favor of having a defined typed interface into the validated data.
Sha1rholder•22m ago
I find TOML is nowhere near as good as YAML. I'd even rather use jsonc.
ChickeNES•16m ago
Yeah, I just use JSON5, it solves all the issues with normal json
nottorp•43m ago
It would be too easy to have every option in a config file documented in comments in the default config file. Think of the poor tutorial industry. It may even make chatbots less useful.
mr_toad•42m ago
Somewhat off topic, but Oracle database connection strings seem to be a form of Lisp. It makes me wonder why they would choose that.
eastbound•35m ago
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...
tosti•37m ago
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.

bigstrat2003•36m ago
Absolutely not. We do not want a stochastic program without any actual understanding of the schema to be interpreting config data.
samrus•34m ago
> 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

anon291•14m ago
Llms are absolutely deterministic if you want them to be.

Still a terrible idea for config

tosti•13m ago
I'm not sure why there's a problem before even trying.

Say for instance you have a program that keeps recipes. In your configuration file, there's settings such as metric/imperical units, allergies, diets, type of stove in your kitchen, and some theming (font, size, color...). You put them all in a file that you can parse, but aunt tillie messes up the formatting and the program breaks.

Instead of changing the config by hand, an LLM could supply the diff according to instructions in English. I really don't see why this would be "Terrible for prod". If the LLM screws up, you're simply back to square 1 and aunt tillie will call you just like she would before she had an LLM to fix her computer.

gwbas1c•36m ago
> 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.

bonestamp2•33m ago
For our internal tooling we use something similar to a bash profile config file with name/value pairs separated by linebreaks. So, our configs look something like:

env=staging

db=0.0.0.0

#descriptive comment

etc=true

jetbalsa•14m ago
ini file format is pretty much this

[section_name]

key=value

key=value

Super3000•28m ago
Because JSON is native to the lingua franca of the internet: Java-/Ecmascript.

It fits into the poor choices we made, <-- Parse error

Garlef•27m ago
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)

stagas•23m ago
Lack of comments is pretty big though for a human editable config.
dd8601fn•18m ago
It’s just one person’s opinion, but I think two things are true enough, here…

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.

krapp•15m ago
JSON still a very simple and useful format and being natively supported on the web and by javascript basically guarantees its universality. Native comments would be nice though. But to be fair even Douglas Crockford suggested using comments in JSON was fine as long as you stripped them out before parsing.

<whispers>but Lua tables are even better.</whispers>

deaf_coder•18m ago
It's so simple and straightforward, and that's why Douglas Crockford claims he "discovered" it, rather than invented it.
francisofascii•18m ago
> Why do so many tools have JSON config files‽

Because XML hasn't been cool for about two decades. And suggesting .ini would you laughed out of the room into retirement.

szatkus•15m ago
> A lot of tech folks resist documentation because they think it provides them with job security.

No, we're just lazy.

binsquare•14m ago
It's readable, it's easy, it gets the job done.

I don't think that's necessarily lazy, it's just efficient

herbst•11m ago
> It's readable, it's easy

That's what I am saying about my ruby codes as well. Still my boss wanted proper commit messages

spottedmarley•13m ago
JSON just works, everywhere, all the time. Sometimes I'll use SQLite if there is a particular need.
Y-bar•12m ago
Can you show an example of how you use SQLite for _config_ files?
LambdaComplex•10m ago
I think your emphasis might be in the wrong place...SQLite for config makes enough sense, but as a config _file_?
jamesponddotco•9m ago
I don't know about others, but I use JSON because it's in the standard Go library, and most of the times, I rather use something weird than add a dependency.

Clankers and Data Races

https://www.tbray.org/ongoing/When/202x/2026/09/01/Un-Racing
1•worik•28s ago•0 comments

Show HN: StealthOS, an iOS privacy sandbox with local AI and Tor

https://www.stealthos.app/
1•steffi_oliver•1m ago•0 comments

Explainable deep learning improves human mental models of self-driving cars

https://www.nature.com/articles/s41586-026-10950-5
1•aanet•2m ago•1 comments

Framamèmes

https://framamemes.org/en/
1•rdmuser•2m ago•0 comments

It's getting harder to get hired on HN

https://112358132134.xyz/blog/harder-to-get-hired-on-hn/
1•sdsd•2m ago•1 comments

Persistent Continuity MCP

https://api.willow-intelligence.com/mcp
2•haleykurtz•3m ago•1 comments

Uber to cut 3,300 corporate jobs in management overhaul

https://www.theguardian.com/technology/2026/sep/02/uber-to-cut-3300-corporate-jobs-in-management-...
1•tjwds•3m ago•0 comments

Russia Blocks GrapheneOS Infrastructure, Forcing Two Server Moves

https://reclaimthenet.org/russia-blocks-grapheneos-infrastructure
1•anonymousiam•4m ago•0 comments

Meta releases Muse Spark 1.3

https://www.axios.com/2026/09/02/meta-debuts-muse-spark-13-as-personal-agent-work-continues
2•zkmon•5m ago•1 comments

Digital Sovereignty Is Written in PHP

https://thephp.foundation/blog/2026/09/02/digital-sovereignty-is-written-in-php/
1•taubek•5m ago•0 comments

Bank of America Vice President Fatally Stabbed in Times Square

https://www.forbes.com/sites/antoniopequenoiv/2026/09/01/bank-of-america-vice-president-fatally-s...
3•Varelion•8m ago•0 comments

Perils of the New Armchair Scholarship

https://newsletter.dancohen.org/archive/perils-of-the-new-armchair-scholarship/
5•devonnull•10m ago•0 comments

The Digital Services Act

https://digital-strategy.ec.europa.eu/en/policies/digital-services-act
5•mooreds•11m ago•0 comments

Altman says countries have to use AI: 'I think it is non-negotiable'

https://www.cnbc.com/2026/09/02/g20-innovation-ministerial-live-updates.html
2•oxag3n•12m ago•0 comments

HiddenLayer nabs $100M as enterprises rush to secure their AI deployments

https://techcrunch.com/2026/09/02/hiddenlayer-nabs-100m-as-enterprises-rush-to-secure-their-ai-de...
2•jacobr1•12m ago•0 comments

Beef production in Brazil has been the largest driver of global deforestation

https://ourworldindata.org/beef-production-in-brazil-has-been-the-largest-driver-of-global-defore...
2•stared•13m ago•0 comments

A portable Agent Skill that grounds README claims in repository evidence

https://github.com/pekral/github-readme-generator
2•pekral•14m ago•0 comments

Rewiring the ribosome to translate proteins encoded in its own RNA

https://www.nature.com/articles/s41586-026-10962-1
2•sbulaev•14m ago•0 comments

Show HN: Cinderella – value a half-finished GitHub repo

https://cinderella.fyi/worth
2•toddy_flogsit•15m ago•0 comments

The Death of Physical Media

https://seerofthe.net/the-death-of-physical-media/
6•speckx•16m ago•0 comments

I tried to predict which jobs AI replaces. The useful part is where it's wrong

https://careeratlas.dev/writing/ai-displacement-model
3•DarkyRxfty•17m ago•1 comments

Anthropic Has Some Alignment Problems

https://thezvi.substack.com/p/anthropic-has-some-alignment-problems
5•paulpauper•18m ago•0 comments

I gave my Fable 5 agent a domain, email, and $90 of SOL in a multisig wallet

https://cairnwake.com/
2•the_cosigner•18m ago•0 comments

Selling Software Worldwide from Europe

https://holtwick.de/blog/sell-from-europe
3•viermalbe•18m ago•0 comments

Researchers Warn AI Could Be Changing Us in an Unexpected Way

https://www.sciencealert.com/interacting-with-ai-might-make-you-act-more-robot-like-researchers-warn
3•wjSgoWPm5bWAhXB•18m ago•0 comments

Unified Arabic

https://worksthatwork.com/6/unified-arabic
2•spacebuffer•19m ago•0 comments

The Truth About American Food Safety

https://www.theatlantic.com/health/2026/09/foodborne-illness-recall-cyclospora-summer/688497/
3•paulpauper•19m ago•0 comments

IBM quantum computer solves classically intractable problem in 15 minutes

https://www.sciencedaily.com/releases/2026/08/260829035219.htm
4•taubek•20m ago•0 comments

Humanity has built the records of FATE by accident

https://ariadne.space/2026/09/01/humanity-has-built-the-records.html
4•miniBill•20m ago•1 comments

Proper Scoring Rules Shape LLM Forecasting

https://arxiv.org/abs/2608.28482
3•bturtel•22m ago•0 comments