|
|
|
|
|
by Sohcahtoa82
1167 days ago
|
|
> you're going to end up translating JSON<->XML which isn't fun. Not fun? It's not even possible in the general sense. If you have XML that looks like: <meal type="breakfast">
<eggs count="3">
<topping>cheese</topping>
</eggs>
</meal>
How would you convert that to JSON without knowing how the JSON consuming application expects it to be formatted? Where do you put the "breakfast" and "count" attributes?You'd need to manually write a translator for each potential translation. |
|
Yep, therein lies the “not fun”. You write a bunch of super complex, brittle code.
Unfortunately because XML is entrenched in certain domains, you have to decide between writing these converters or doing everything in XML which also sucks, especially if you’re trying to write a modern app with a modern stack.