Humans can screw up anything. And more text often allows it to hide for longer.
XML has them sorta built in (basically all (notable) libraries support them), but it's not like it's required or somehow innately protected because of that. It's just a bit easier to adopt.
JSONSchema? It's pretty standardized and well accepted.
All JSON evaluates to some value in YAML. But it's not always the value you want it to.
Oh hey, I had some while making https://hn-blogs.kronis.dev/
I wrote more about it on my blog: https://blog.kronis.dev/articles/ever-wanted-to-read-thousan... but the gist of it is that I had to parse thousands of blog feeds and some article from 2009 included a SOH control sequence inside of otherwise valid XML and this broke everything, until I added additional error handling.