3 ms·
In the kitchen sink example (https://json5.org/ https://json5.org/), they say: > "backwardsCompatible": "with JSON", But in that same example, they have a com
by stronglikedan 1y ago
In the kitchen sink example (https://json5.org/ https://json5.org/), they say:
> "backwardsCompatible": "with JSON",
But in that same example, they have a comment like this:
> // comments
Wouldn't that make it not compatible with JSON?
- coldcache 1y agoIt’s a superset of JSON. I guess they mean it’s backwards compatible in terms of reading existing JSONs?
- rapfaria 1y agoYour existing JSON < 5 will work with json5, not the other way around
- crazygringo 1y agoIt's confusing. From what I understand, it's "backwards-compatible" with JSON because valid JSON is also valid JSON5. But it's not "forwards-compatible" precisely because of comments etc.
- metadat 1y agoStating `backwards compatible` at a feature is at best confusing for readers who haven't already bought into JSON5 as "the way". If people tended to interpret English correctly and not be susceptible to misinterpreting written statements, that would be nice. Reality is a bugger!
- kiitos 1y agoBackwards-compatible means the new thing can handle the old things. Here JSON5 is backwards-compatible with JSON. Forwards-compatible means the old thing can handle the new things. Here JSON is not forwards-compatible with JSON5.