←back to thread

Fixing JSON

(www.tbray.org)
139 points robin_reala | 1 comments | | HN request time: 0.212s | source
Show context
otterley ◴[] No.12327873[source]
I'm not sure how dropping comma separators would work in practice, because carriage returns aren't required between array or hash elements in JSON.

So this would also have to be legal:

   { "foo": "bar" "baz": "quux" }
I'm not sure that's better, personally. It's also syntactically invalid in Javascript:

   > "bar" "baz"
   SyntaxError: Unexpected string
replies(2): >>12328028 #>>12330762 #
1. hutzlibu ◴[] No.12330762[source]
You could use "line-break" instead - but I also don't see really the point in removing comma's in the first place.