4 ms·
the funny thing is that json doesn't even need commas, they essentially act as whitespace, any amount or no amount would make no difference in the meaning of th
by afiori 5y ago
the funny thing is that json doesn't even need commas, they essentially act as whitespace, any amount or no amount would make no difference in the meaning of the document.
Arrays with hole are a JS-only feature
- the_jeremy 5y ago> json doesn't even need commas JSON is defined by the spec. The people who wrote the spec think otherwise[0]. [0]: https://www.json.org/json-en.html https://www.json.org/json-en.html > Arrays with hole are a JS-only feature. There are other langauges that allow arrays with missing elements.
- afiori 5y agoJSON requires commas, but does not need them, semantically they are treated like whitespace The document > {1:2 3:[4 5]} can only be "commafied" to > {1:2, 3:[4, 5]} > There are other langauges that allow arrays with missing elements. But javascript is the only one that gave JSON the JS in its name