Sunday, September 27, 2009

XML to JSON

For decades, XML remained as the only choice of communication / data transformation across layers in any applications that are architected based on services. It opened doors for many possibilities like inter-operable communications across different platforms. With the maturity of the platforms & products, average XML message size bloated because of lots of metadata & info related to security, transaction etc. The structure of XML is simple, elegant & human readable. But for consumers like applications codes, it is not a must for a communication mechanism to be human readable.

With the no. of applications using AJAX is increasing, especially in the case of RIAs, JSON replaced XML as the primary choice. This is becoming significant with applications shifting from SOAP-RPC to Restful services.

Why JSON is becoming so important:

• JSON can be easily handled by the AJAX / JavaScript clients than XML
• It is more lightweight than XML & hence high performing

No comments: