logoalt Hacker News

JoshTriplett12/09/20242 repliesview on HN

> The whole reason JSON rules the world is because it's brutally simple.

I don't think that's the primary reason. JSON is pervasive because it started out being trivially parseable by JavaScript going back to when people just evaluated it, even before browsers had ridiculously high-perfomance safe JSON parsers. All the other formats are still harder to work with from JavaScript.

If not for that, personally I'd advocate TOML, which is incredibly simple.


Replies

bobbylarrybobby12/09/2024

I find toml impossible to both read and write in all but the simplest cases.

peeters12/09/2024

> trivially parseable by JavaScript going back to when people just evaluated it

Comments and all, ironically.

I mean sure, "and all" would frequently include script injections etc, but you can't argue it wasn't more feature rich!