2 ms·
Nicely done. First I've seen "SEN". Treating the colons as white space, as you've done with the commas, will move you one step closer to The Correct Answer™.
by specialist 6y ago
Nicely done. First I've seen "SEN".
Treating the colons as white space, as you've done with the commas, will move you one step closer to The Correct Answer™.
- peterohler 6y agoI suppose that is possible to remove the colons but it is nice having the extra reminder that the left side of the colon is a key and the right a value. That could easily become lost if a new line is inserted after the key. SEN is new. After dealing with broken JSON due to commas missing or one at the end of an array and some of the team using Javascript this was a way of sucking in the broken JSON and fixing it.
- specialist 6y ago> After dealing with broken JSON... Postel tried to warn us. > ...nice having the extra reminder that the left side of the colon is a key and the right a value. Totally. IMHO: whitespace, formatting, delimiters are for humans. The parsers can do without. With some exceptions, like your examples of quoting strings to remove ambiguity.
- kccqzy 6y agoThe colons really aren't necessary in most cases. Clojure does away with the colons for instance. And I'm pretty sure GP is referring to some kind of Lisp.