←back to thread

Fixing JSON

(www.tbray.org)
139 points robin_reala | 1 comments | | HN request time: 0.22s | source
Show context
cies ◴[] No.12328149[source]
JSON is not optimized to be written by humans (I'd argue even JS is not well optimized for that </joke>).

There are other formats for that, like YAML and TOML[1].

When JSON is needed for human-to-computer stuff, I'd say TOML is pretty much always a better choice. A common use case for TOML is config files. And I see a lot of config in JSON lately; this makes me sad. (Though not as sad as the config-in-XML thing the Java ecosystem suffered from.)

1: https://github.com/toml-lang/toml

replies(3): >>12328239 #>>12329007 #>>12329698 #
crdoconnor ◴[] No.12329007[source]
TOML is kinda ugly compared to YAML.
replies(2): >>12330489 #>>12331057 #
1. pmlnr ◴[] No.12331057[source]
Think of it as ini 2.0.