[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: JSON (was Re: 10th anniversary of the annoucemen
On 06/08/06 11:06, Michael Champion wrote: > down below. XML has many disadvantages, especially for object > serialization, but those problems pale in comparison to the problems of > not having a universal data interchange format. Universality is tricky business, though. It's not possible to wish something into "universal" status. > language, has to use your data? What happens when you need to start > supporting HTML markup of the text fields in those objects? JSON will > hit a brick wall, and so will S-Expressions AFAIK. Why do you think JSON will hit a brick wall? It's not tough, if not easier, to HTMLise JSON objects because JS is available more easily than XSLT. What I mean is that if you're using JSON, your data is accessible to more browsers than XML (unless you apply XSLT on the server side, which then becomes a case in favour of (X)HTML rather than XML). > frying pan yet avoid the non-interoperable format fire would be if XML > 1.0 is the fallback that *everyone* supports if JSON, S-expression, or This makes sense. > soooo 1990's. Use an alternative where it solves a real problem and JSON solves a real problem of object serialisation and interchange without resorting to binary or difficult-to-read representations. APIs exposed over HTTP need to exchange messages that contain objects more often than they need to exchange documents and XML isn't the most optimal way to do it. I used to use var_dump for debug tracers in my PHP scripts but I switched to json_encode because it prints everything in one line, yet is much easier to read. XML? Heh, won't even dare use it for dumping objects etc. > doesn't create worse interop problems, but invest any excess energy > toward improving XML, incrementally and hopefully in a > backwards-compatible way. Maintaining things in a backward compatible manner soon hits limitations in terms of what can and can not be done. XML has hit the wall where syntax is concerned. E.g. it's awfully irritating to write <foo>...</foo> when it could've been <foo>...</> (yeah, nXML mode helps a lot there). It's even more irritating to read that stuff when the tag soup takes up 70% of the visible text. -- Tahir
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|