JSON
The JSON object is sometimes used as a "communication bridge" because it is light and fast, unlike the XML that has a sharper structure. The way the JSON object is manipulated is also one of the organizational facilities, making the code cleaner and dedicated only to the data structure.
Not to mention that it is possible to insert an Array directly into an item, as well as another JSON object.
This ease of handling along with speed/lightness is one of the main reasons that makes JSON the perfect tool for data communication with server.
XML
I believe that XML can function as a "mini-bd", recording some information crucial for some system development, whether local or web.
The data management system is a little more structured, where you can add parameters and values in a given item.
Although the structure of an XML is organized and well understood, the interaction with the Web can leave a little more to be desired, because it is a little more complicated to work to rescue all this information, apart from the fact that you cannot adhere to an Array object within a node, creating several nodes with an identical name.
SOME ADVANTAGES OF JSON
- The Parsing is faster
- Occupies less bytes (LIGHTER)
Resposta baseada neste
link