Data Serialization Formats – JSON, YAML, and XML

Data serialization is a technique that translates structured data into a format that enables storage or sharing of the digital information in a state that permits recovery of its original structure. Various computer systems have different hardware architecture, operating systems, and/or addressing mechanisms, which can be a challenge that is why serializing the data enables different users to have a standardized data serialization formats that can be easily shared across various applications.


Data Serialization Formats and its Functionalities

Choosing the data serialization format for an application should depend on factors such as human readability, the complexity of data, and storage and speed limitations. Here are some of the common data serialization formats used to ease the storage and sharing of data across the Internet.


JSON – JavaScript Object Notation

This serialization format was standardized in 2013 and is considered a lightweight data-interchange format that translates data structures easier to be read and written by humans. This human-readable format has a short syntax textual format with limited data types derived from JavaScript data formats. JSON data does not need a separate parser since they are referenced to JavaScript objects compared to XML.

The following are the benefits of using JSON files:

  1. Self-describing
  2. Simplicity and compact
  3. Ease in learning and understanding


XML – Extensible Markup Language

XML is widely used in this age of web applications and development because of its simplicity in sharing and storing data. A nested textual format that is human-readable and can also be edited using a schema-based validation used in metadata applications and web publishing and services transfer of data.

Below are some of the advantages of using XML:

  1. Separates data from HTML
  2. Simplified data sharing and transport
  3. Simplified platform change
  4. Data availability increase
  5. Useable to create a new Internet language


YAML: YAML Ain’t Markup Language

A lightweight text human-readable format that supports comments and is really easy to edit. Considered as a superset of JSON that supports complex data types that enable ease in mapping native data structures. The structured data is used in configuration settings, Apps that require MySQL self-references in relational data, and document headers. The serialized data is so readable that even the content of the front page is displayed in YAML.

Using YAML has the following perks, and below are some of the most obvious ones:

  1. Working with a text editor is easy
  2. Supports the Unicode character set
  3. Extensible and expressive
  4. Portability between Programming languages

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: