4 ms·
XML is not a good interchange format, because it doesn't map well to a standard programming structures. There's no array or map in XML. Developers must use OXM
by vbezhenar 9y ago
XML is not a good interchange format, because it doesn't map well to a standard programming structures. There's no array or map in XML. Developers must use OXM libraries (object to xml mapper). JSON is much more direct and simple format.
XML is good for anything that looks like document markup.
- andrewflnr 9y agoSometimes your actual data doesn't map well to "standard programming structures". If that's the case, you really want your interchange format to express reality as far as possible, not how it will be processed in any particular program. I don't have enough experience to be authoritative here, but this seems like a bad argument.
- mring33621 9y agoI will agree that JSON is 'simple' but it is only 'direct' in the context of javascript. For other languages, it is similar to XML in handling overhead. JSON's significant technical problem is a lack of a formal schema definition and enforcement mechanism. You may feel that this is actually an advantage, but I assure you, as someone who has written systems of record for billion dollar businesses, it is not.