4 ms·
>Complete lack of mechanical sympathy + laziness is why JSON is popular outside of the web world I generally prefer JSON as a serialization format for a variet
by unimpressive 11y ago
>Complete lack of mechanical sympathy + laziness is why JSON is popular outside of the web world
I generally prefer JSON as a serialization format for a variety of reasons beyond what you cited:
1. Simplicity/plain text. Even a total newb could read a JSON file and probably puzzle out how the data works. This is important if I'm providing an export function or otherwise expect my users might want to shop somewhere else to deal with this data.
2. Forward compatibility/future proofing. If somebody finds my JSON file in twenty years with no documentation, (1) ensures that it's not going to be lost to them and they'll be able to extract the data with minimal difficulty.
3. Cross platform. It might not be the best format, but it's going to be supported in pretty much any language I would ever want to add support for the data to in a new system.