Http://www.nowamagic.net/librarys/veda/detail/216JSON is an effective format for AJAX applications because it enables quick conversion between JavaScript objects and string values. Because Ajax applications are ideal for sending plain text to server-side programs and receiving plain text accordingly, APIs that generate text are naturally preferable compared to APIs that cannot generate text, and JSON allows you to work with native JavaScript objects without having to worry about how to represent them.
XML can also provide similar benefits in terms of text, but several existing APIs for converting JavaScript objects to XML are not mature with JSON APIs, and sometimes you have to be cautious when creating and working with JavaScript objects to ensure that the processing you take with the XML you choose will API collaboration. For JSON, however, the situation is quite different: it handles almost all possible object types and returns you a very good representation of the JSON data. Therefore, the greatest value of JSON is that JavaScript can be really processed as a JavaScript rather than a data format language.
All the tricks you've learned about using JavaScript objects can be applied to your code without having to worry about how to turn those objects into text.
How to handle special characters in JSON introduction to several solutions