4 ms·
JSON5 is the way to go. It supports comments and trailing commas. Unfortunately it's going to be difficult to supplant legacy JSON, which is so pervasive.
by timmytokyo 5y ago
JSON5 is the way to go. It supports comments and trailing commas. Unfortunately it's going to be difficult to supplant legacy JSON, which is so pervasive.
- dheera 5y agoExcept parsing JSON5 in browser is super slow. Native JSON.Parse doesn't support it, non-native parsnips are slow, and the only fast way to parse it is `eval()`.
- TheCondor 5y agoDoes the browser need JSON objects with comments? The desire to use a single interchange format for all data is the problem. There are plenty of reasons to support comments and minor syntax issues that JSON itself dislikes for human consumable and interactive JSON. I'd think software JSON could be just that.
- The_Colonel 5y agoThis shouldn't really matter for the JSON5 use case - config files - which are usually small enough. For machine-to-machine generated payloads JSON is good enough.