4 ms·
>For example, there's a problem with coupling between JSON and application data structures in that they must be the same basic shape. So to give your JSON forma
by Yarnage 14y ago
>For example, there's a problem with coupling between JSON and application data structures in that they must be the same basic shape. So to give your JSON format the ideal shape for consumers, you need to translate into a layer of objects first - and your consumers need to do the same thing to get it into their internal data structures,
Don't you need to do the same-thing with XML? How do you use XML data without conforming it to your internal structures first? You can't just guess...I just don't get the difference here. I'm trying to understand what XML can offer that JSON cannot. Do you have an example?
>Similarly, you aren't free to evolve; instead, you produce another version, and all your clients must upgrade.
Same-thing here; doesn't XML have the same issue? Upgrading formats can make XML useless just as well as JSON. Also, just like JSON, you can upgrade them without issue so I'm not seeing the distinct advantage of XML over JSON. Do you have an example?
I'm not trying to be argumentative; I just haven't seen any examples showing what makes XML better than JSON just lots of "you can't do this in JSON" and I can't find a way to make that true in my head...
- 6ren 14y agoYes, XML has the same problem. The end of that paragraph reads: > The same problems occurred in XML (and CORBA), and though JSON is an improvement in that it allows fields to be added more easily, the tooling to support conversion/evolution hasn't grown up around it (and isn't growing). Maybe it's not clear, but the tooling to solve these problems has grown up around XML. Mainly XSLT, and visual mappers that operate on top of that. Examples: MS's Biztalk mapper http://msdn.microsoft.com/en-us/library/aa547076.aspx http://msdn.microsoft.com/en-us/library/aa547076.aspx; MapForce http://www.altova.com/mapforce.html http://www.altova.com/mapforce.html; StylusStudio XML mapper http://www.stylusstudio.com/xml_to_xml_mapper.html http://www.stylusstudio.com/xml_to_xml_mapper.html; both IBM and Oracle have similar - this category of tooling has been around a decade or so; XSLT itself started in 1997 http://en.wikipedia.org/wiki/XSLT http://en.wikipedia.org/wiki/XSLT). Have a look at the images in those links - you'll immediately see what they do. So to be precise, XML doesn't solve these problems, its tools do.