3 ms·
- To showcase to the many people who aah JSON is more legible that you can use YAML as "legible" JSON - Most XML files I encounter come in this format. You can
by jeroenhd 3y ago
- To showcase to the many people who aah JSON is more legible that you can use YAML as "legible" JSON
- Most XML files I encounter come in this format. You can skip the preamble but it wouldn't match my real life experience.
- All readable config files I encounter have comments. I forgot to add comments to the XML representation, but I can't edit my comment anymore. I think everyone who ever encountered XML knows how to add comments, though. JSON simply doesn't support comments unless you use a niche JSON derivative.
As for the string versus integer problem: you always need a schema, or you'll run into very funny problems down the line. None of these formats intrinsically know what keys refer to an object and what keys refer to a string, that's all based on your schema anyway.
- BoorishBears 3y agoJSON and YAML intrinsically define that. "10" is a string. 10 is a number. [10] is a single number in an array. {"number":10} is an object. You're conflating advice for databases with advice for data serialization formats: XML captures less information about the data it contains intrinsically. _ Also please don't use YAML as "JSON with comments", you're just asking to run into some obscure bug/corner case If you're willing to do weird things there's always JSON5