Tuesday, 13 August 2013

Difference between JSON and XML

                                Difference between JSON and XML


JSON's concise syntax makes it very light and compact. It is also easier to parse from JavaScript, and that’s one of the main reasons it’s preferred for browser-based client-side applications (note that JSON stands for JavaScript Object Notation, it’s just natural). If you want to work with XML from JavaScript, you'll need to use an extra library for that. With JSON, you can just parse the message (let’s say with JSON.Parse() ) and work directly with js objects.


JSON.parse('{"name":"ram"}');

No comments:

Post a Comment