Convert xml string to json2013Nav 2013 R2 Convert Xml To Json

Convert Xml To Json Javascript

Hi all,In Previous post related to ODATA we saw how to publish and consume a Odata Web Services from NAV 2013 & 2013 R2.Below are some link Related to Old Articles Published for Odata.Today we will see how to Return / Obtain a JSON Document.What is JSON?JSON (JavaScript Object Notation) is a lightweight format that is used for data interchanging. It is also a subset of JavaScript's Object Notation (the way objects are built in JavaScript)Think of it as an alternative to using XML for transferring data between software components.JSON is built on two structures:A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.JSON Structure.

JSON is Like XML Because. Both JSON and XML are 'self describing' (human readable) Both JSON and XML are hierarchical (values within values) Both JSON and XML can be parsed and used by lots of programming languages; Both JSON and XML can be fetched with an XMLHttpRequest.

John DoeAnna SmithPeter JonesJSON is Like XML Because. Both JSON and XML are 'self describing' (human readable). Both JSON and XML are hierarchical (values within values). Both JSON and XML can be parsed and used by lots of programming languages. Both JSON and XML can be fetched with an XMLHttpRequestJSON is Unlike XML Because. JSON doesn't use end tag. JSON is shorter.

JSON is quicker to read and write. JSON can use arraysThe biggest difference is:XML has to be parsed with an XML parser. JSON can be parsed by astandard JavaScript function.Why JSON is Better Than XML.