←back to thread

Fixing JSON

(www.tbray.org)
139 points robin_reala | 1 comments | | HN request time: 0s | source
Show context
dlbucci ◴[] No.12327731[source]
At this point, I'd settle for JSON5 (http://json5.org/), which says any JSON that's a valid ECMAScript 5 object is valid JSON (including trailing commas, unquoted keys, single quote strings, and comments). I don't think it's very popular at this point though, but I guess I've never tried to use it.
replies(2): >>12327828 #>>12327981 #
colanderman ◴[] No.12327981[source]
Ugh no. Adding all that crap complicates writing a correct parser. JSON's value is in that it is easy to parse.

If editing JSON is your problem, use a better editor. If you really want to use JSON as a config file format, use something like YAML instead.

replies(1): >>12330758 #
1. majewsky ◴[] No.12330758[source]
Or TOML, if you find YAML's syntax too messy.