3 ms·
This may be heretical but surely the problem isn't lack of comments et al in JSON, rather that people try to use JSON for everything, when it was designed to be
by DrScientist 2y ago
This may be heretical but surely the problem isn't lack of comments et al in JSON, rather that people try to use JSON for everything, when it was designed to be a text representation of javascript objects?
- Sankozi 2y agoIf it was really designed for representing JS objects then it was really bad job. Neither JSON supports JS objects (lack of NaN) nor JS supports JSON (lack of arbitrary precision decimals).
- DrScientist 2y agoFair enough - perhaps I should have said it was inspired by Javascript literal syntax and simplified to make it a platform independent data exchange format and not a application configuration format. Though I can see how the latter is tempting if your application is in JS.