3 ms·
This one unambiguously seems like a mistake. Is there any steel man argument for why an extra comma should not be acceptable? Save a byte over the network?
by 3eb7988a1663 2y ago
This one unambiguously seems like a mistake. Is there any steel man argument for why an extra comma should not be acceptable? Save a byte over the network?
- a3w 2y agoEcmascript is changing JS. JSON is old and unchanging. Which is an advantage and a disadvantage.
- kstrauser 2y agoI think that’s literally the only argument for it. And if you use compression, now you have to waste an extra symbol on `”` in addition to `”,`, so even that’s debatable.
- hinkley 2y ago“ is already a symbol, but for formatted JSON it’s more likely to be “,\r and “\r
- kstrauser 2y agoI bet `: “` is more common than a lonely double quote, except at the end of a list of quoted values. Eh, who knows? But I’m skeptical that the omitted comma actually saves any space in common situations.