Remix.run Logo
abustamam 2 hours ago

One of the API providers I use at work returns responses in XML and we use an XML parser to parse it to JSON and even then it's not perfect.

What do you like about XML? I feel like I'm missing something.

refulgentis an hour ago | parent [-]

I don't reach for it often but I've been around the block a bit, CC processors in the iPad point of sale I built circa 2010 used it and it seemed a bit off/unnecessary.

In retrospect, its useful for creating islands of sanity/enforcement in a codebase. Lightweight way to give type annotations across organizational boundaries.

> we use an XML parser to parse it to JSON and even then it's not perfect

I can't quite picture this: how does one parse XML to JSON? I assume there's code that's parsing XML and returning a JSON object? What would make this not perfect, other than a poor implementation of the translator? Would them using JSON help? Is JSON is a much less expressive format than JSON, is it possible to 100% translate their XML to JSON?