JSON (JavaScript Object Notation) is a lightweight data-interchange format. Unlike XML where complex schemas are required to structure data, with JSON you simply have an object that just contains the data with their field name. Here is an example of JSON:

success: true,
errors: [ ],
message_id: 600969775,
message: "SMS Successfully Queued",
remainingCredits: 915

The same string in XML could look like this:

<? xml version="1.0" encoding="UTF-8" ?>
<message>SMS Successfully Queued</message>

XML supports various other extras that could end up making the file containing the data much bigger. In this specific case the size difference isn't that much, but this can become much more noticeable if the data becomes more. That is why JSON is a bit more lightweight.

Namhost uses cookies to ensure that we give you the best experience, if you continue browsing, you are consenting to our use of these cookies. If you are not giving consent change your cookies settings prior to continuing. Read about how we use cookies and how you can control them by clicking "Privacy Policy".