←back to thread

Fixing JSON

(www.tbray.org)
139 points robin_reala | 3 comments | | HN request time: 0.344s | source
1. 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 #
2. idunno246 ◴[] No.12328028[source]
Let's just remove periods from sentences to They clearly aren't needed since there's a capital letter there

If anything I'd rather trailing commas in lists be defined as valid, and separation there is useful like you say

3. 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.