by zelphirkalt · 3y ago · 0 comments
The number of times I had to think "That would not have happened with a JSON file." ... But I guess the debate is so well known on HN, that I don't need to go into it now.
JSON is not the the be-all and end-all of formats. All formats have their drawbacks, and there is not one format that is THE BEST for absolutely everything.
The author never claimed that YAML is simple, or whatever. But what I can see, is why'd they use YAML instead of JSON for this specific project.
The first thing that comes to mind is multiline strings, as files typically have multiple lines. How'd you do that with JSON? "fn main {\nprintln!(\"Hello\")\n}"? Looks super fun to edit.
I think you should read the OP again.