4 ms·
> Except for consuming the API directly in a browser, there's little reason that XML should cause you pain. I disagree. Unless the data I'm working with are a
by mccutchen 16y ago
> Except for consuming the API directly in a browser, there's little reason that XML should cause you pain.
I disagree. Unless the data I'm working with are awkward/difficult to represent in JSON (ie, they're highly structured documents, for which XML is ideal), XML is always more painful to work with. More painful to produce and to consume.
This is working primarily with Python and Javascript.
- jbrennan 16y agoI can echo this for working on iOS with Cocoa touch as well. While there's no native JSON provided by Cocoa touch, there are excellent third-party tools. XML in iOS is a beast, and a real pain to read (and I've never attempted to write it). Plus, on mobile devices especially, XML is slower to download because it is more verbose than the equivalent JSON object. So I agree, unless you need a highly structured document, I always go with JSON over XML.