3 ms·
> The nice thing about JSON5 is, you can move a project from a JSON-based config to JSON5-based config and get a significant improvement in human friendliness w
by Timon3 3y ago
> The nice thing about JSON5 is, you can move a project from a JSON-based config to JSON5-based config and get a significant improvement in human friendliness without sacrificing backwards compatibility
What backwards compatibility are you referring to? It seems like you actually are sacrificing BC, as the JSON5 file won't be readable by older versions of your software (that doesn't use a JSON5 parser yet).
- mort96 3y agoThat's forwards compatibility. Backwards compatibility: New versions of the software can use the files from old versions. Forwards compatibility: Old versions of the software can use the files from new versions. If you switch from JSON to JSON5, the new version can use the config file from an old version. If you switch from JSON to TOML, your users have to create a new config file, or you will have to support both JSON and TOML.
- idbehold 3y agoThe software maybe backwards compatible, but the format is not backwards compatible as old software (expecting JSON) cannot parse the JSON5 format.
- mort96 3y agoI'm not going to argue about that, since I never claimed that JSON5 is backwards compatible with JSON. I said software can move from JSON to JSON5 without breaking backwards compatibility. If you want to claim that JSON5 is forwards compatible but not backwards compatible with JSON, that's fine by me.
- Timon3 3y agoMakes sense, thank you!