24 Data formats

This chapter covers

  • Why data serialization formats are needed
  • JSON’s primitive and structured data types
  • Interpreting JSON-formatted data
  • Other data serialization formats: XML and YAML

In the previous chapter, we established that communication between software applications on different devices is essential for network automation. We also covered one essential part of making that possible: application programming interfaces (APIs). APIs open up an application’s data to allow external applications to access it in an efficient and uniform manner.

In this chapter, we’ll cover the second half of the puzzle. For successful communication between applications, it’s not enough for App A to be able to access App B’s data; the data itself must be in a format that App A understands. That’s the role of data serialization formats—standardized data formats that allow applications to communicate data in an agreed-upon format that both parties understand. With regard to the CCNA exam topics, we will cover topic 6.7: Recognize components of JSON-encoded data.

24.1 Data serialization

24.2 JSON

24.2.1 JSON primitive data types

24.2.2 JSON structured data types

24.2.3 Identifying invalid JSON

24.3 XML and YAML

24.3.1 XML

24.3.2 YAML

Summary