I'm not sure I understand the issue with base64 in JSON? Have I misunderstood the point there?
I'm not sure I understand the issue with base64 in JSON? Have I misunderstood the point there?
JSON, on the other hand, is dead simple: You have your list/array, dict/object and four value types. Representing JSON in your favorite language is straight-foward and how the serialized version of a hierarchy looks is immediately obvious in nearly all cases.
XML is a markup language. It's in the name even. Trying to use it for serialization is weird.
> XML is a markup language. It's in the name even.
It can be used for markup, but isn't limited to that.
Then, every implementer in a statically typed language needs to translate the JSON format into structures in their own language. And this is impossible to automate, unless the JSON API uses a formally defined schema (eg. OpenAPI or GraphQL schemas), but then we're back to square 1.
If you don't care about that (eg. in dynamically typed languages), you can parse XML just like you parse JSON, using something like https://github.com/martinblech/xmltodict