4 ms·
This is a terrible idea. JSON has been successful because it found a sweet spot between three factors: 1. It is useful. There is enough flexibility to represe
by Silhouette 13y ago
This is a terrible idea.
JSON has been successful because it found a sweet spot between three factors:
1. It is useful. There is enough flexibility to represent most structured data easily.
2. It is portable. There are libraries to read and write JSON data in every major programming language.
3. It is simple and unambiguous.
Things like allowing keys to be unquoted if they're valid identifiers in JavaScript and as JavaScript happens to be defined by the latest standard save two characters, at the expense of breaking portability and future-proofing, making the specification more complex, and introducing ambiguity. This is not a worthwhile trade-off.