Categories
CCNP Enterprise Core (350-401) Cisco Software Defined Networking

API Data Formats (XML and JSON)

Extensible Markup Langauge

Extensible Markup Language (XML) is a tag based language. The tag must begin with a ‘<‘ symbol and end with a ‘>’ symbol.

A start tag named named interface would be represented as <interface>

The tag must also be closed with an end tag, known as </interface>

One key feature of XML is it designed to be easily readable by both human and computers. Indention of the XML also helps make it easier to read though it is not required.

JavaScript Object Notation

JSON has not been around as long as XML, but is it very popular and it has been said that JSON is much easier to work with in comparison to XML.

JSON is simple to read and create, and the way data is structured is said to be much cleaner.

JSON stores all information in what is called key and value pairs.

A JSON object starts with a { and ends with a }, with key pairs inside

{
 "name": "George",
 "father": "Bob",
 "mother": "Jasmin"
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.