What is JSON?
- The alternative for JSON is XML wrapped with SOAP.
- It is to overcome the disadvantages of passing XML data for communication between objects.
- Most web browsers cannot create, parse and manipulate XML data. That is the main reason for going to JSON. Also, JSON is lightweight and provides asynchronous calls with server and controls the full-page rendering.So, It is ideal to be used with AJAX based web applications.
- XML by itself does not provide any of the type information instead it depend upon XSD (XML Schema Definition) whereas, JSON provides the scalar data type information with native array support and Object support.
- Comparing to XML, JSON is simpler and smaller in size which does not depend on too many other technologies like XSD, XSLT,etc