▲ | stronglikedan 3 days ago | |||||||
In the kitchen sink example (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? | ||||||||
▲ | crazygringo 3 days ago | parent | next [-] | |||||||
It'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. | ||||||||
| ||||||||
▲ | kiitos 2 days ago | parent | prev | next [-] | |||||||
Backwards-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. | ||||||||
▲ | rapfaria 3 days ago | parent | prev | next [-] | |||||||
Your existing JSON < 5 will work with json5, not the other way around | ||||||||
▲ | arvindh-manian 3 days ago | parent | prev [-] | |||||||
It’s a superset of JSON. I guess they mean it’s backwards compatible in terms of reading existing JSONs? |