I’ve seen XML parsers that will convert element content from strings to native types by default. So “0” becomes an int, “true” becomes a boolean, and “null” becomes an actual null. I had to take extra steps to keep everything as a string unless explicitly told not to.
XML can validate itself and there’s the self-documenting WSDL; so while it has more overhead and an ugly syntax it can make for a more stable and earlier to understand API for your API’s consumers.
I’ve seen XML parsers that will convert element content from strings to native types by default. So “0” becomes an int, “true” becomes a boolean, and “null” becomes an actual null. I had to take extra steps to keep everything as a string unless explicitly told not to.
JSON does not have this problem, BTW.
I don’t think anyone actually chooses XML. There’s no reason to use it over JSON unless you need to.
XML can validate itself and there’s the self-documenting WSDL; so while it has more overhead and an ugly syntax it can make for a more stable and earlier to understand API for your API’s consumers.
This point is always stated about XML as if it were the most important part of choosing XML.
But jsonschema exists. It has the same capability.
Ah but… Nobody uses that! Because then you wouldn’t choose JSON