3 ms·
> JSON & CSV, whilst undoubtedly simpler formats, still lack the 'power' of the XML ecosystem. "Power" is often a compromise. There are convincing arguments t
by enriquto 8y ago
> JSON & CSV, whilst undoubtedly simpler formats, still lack the 'power' of the XML ecosystem.
"Power" is often a compromise. There are convincing arguments that plain text is, after all, more powerful than JSON, CSV and XML. It all depends on the context where this power will be exerted.
If you only need to store name-value pairs, it may be better (e.g., more robust, more powerful) to use
scanf("%s=%d", &name, &value);
than to depend on a particular json or xml implementation.
- heavenlyblue 8y agoAnd then someone puts "=" in your key value.
- enriquto 8y agoPray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?
- Thiez 8y agoSo any url with url parameters (e.g. `?foo=bar`) are forbidden as values? Seems like a rather big sacrifice to make for simplicity.
- tannhaeuser 8y agoNo, it's only forbidden as part of keys. Assuming newlines are used to delimit the value, it's newline chars you can't use in values, though.
- koolba 8y ago... and then your combine the two by saying that the text for the value is JSON encoded so \n can be used for new lines.
- paulddraper 8y agoAlso any base64 encoded data.
- benibela 8y agoThat is why I am using INI files for config Unfortunately now I wanted to store a multi line value and the library I am using does not support that. I need an entire new config system