[Home] [By Thread] [By Date] [Recent Entries]
--- Michael Champion <mchampion@x...> wrote: > Tatu Saloranta wrote: ... > Those who wish to get out of the XML frying pan > might remember the fire > down below. XML has many disadvantages, especially ... Good points, but: ... > but I think XML got popular partly because there > are even more > requirements for information interchange that are > somewhere in the > middle - some mixture of human readable text and > machine processable data. Is this really so? I mean, localized text, sure... but one completely marked up? Such use cases are common in some domains (knowledge/content management systems), but not in many others. You could of course argue that they may be more common in future, with increased semantic mark up... we'll see. ... > scenarios, where somebody else's app, maybe written > in a compiled > language, has to use your data? What happens when Actually, I would see this as being easier with JSON than with XML (although granted XML-binding tools have improved markedly -- JAXB 2, for Java, is almost easy to use)? This because it does not have hierarchical-to-objects impedance, like XML does. That's the single most important benefit, to me. That it's also "native" Javascript code is just icing on the cake. > you need to start > supporting HTML markup of the text fields in those > objects? JSON will But if it's HTML markup, it is quite separate concern from structuring of the message itself, and thus often best transferred as opaque blob (same way as often it's practical to store XML in relational DB as BLOB, instead of going through the trouble of bridging the impedance and convert between data models). Optimally, that content would be marked up using, well, HTML or XML. I wouldn't see the benefit of trying express that markup in JSON, nor necessarily the need. -+ Tatu +- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
|

Cart



