🌐
CCNA Prep
  • Intro
  • Network Devices
  • Interfaces and Cables
  • OSI Model & TCP/IP Suite
  • Intro to the CLI
  • Ethernet LAN Switching (Part 1)
  • Ethernet LAN Switching (Part 2)
  • IPv4 Addressing (Part 1)
  • IPv4 Addressing (Part 2)
  • Switch Interfaces
  • IPv4 Header
  • Routing Fundamentals
  • The Life of a Packet
  • Subnetting (Part 1)
  • Subnetting (Part 2)
  • Subnetting (Part 3 - VLSM)
  • VLANs (Part 1)
  • VLANs (Part 2)
  • VLANs (Part 3)
  • DTP/VTP
  • Spanning Tree Protocol (Part 1)
  • Spanning Tree Protocol (Part 2)
  • Rapid Spanning Tree Protocol
  • EtherChannel
  • Dynamic Routing
  • RIP & EIGRP
  • OSPF (Part 1)
  • OSPF (Part 2)
  • OSPF (Part 3)
  • First Hop Redundancy Protocols
  • TCP & UDP
  • IPv6 (Part 1)
  • IPv6 (Part 2)
  • IPv6 (Part 3)
  • Standard ACLs
  • Extended ACLs
  • CDP & LLDP
  • NTP
  • DNS
  • DHCP
  • SNMP
  • Syslog
  • SSH
  • FTP & TFTP
  • NAT (Part 1)
  • NAT (part 2)
  • QoS (Part 1)
  • QoS (Part 2)
  • Security Fundamentals
  • Port Security
  • DHCP Snooping
  • Dynamic ARP Inspection
  • LAN Architectures
  • WAN Architectures
  • Virtualization & Cloud, Containers, VRF
  • Wireless Fundamentals
  • Wireless Architectures
  • Wireless Security
  • Wireless Configuration
  • Network Automation
  • JSON, XML, & YAML
  • REST APIs
  • Software-Defined Networking
  • Ansible, Puppet, & Chef
Powered by GitBook
On this page
  • JSON
  • XML
  • YAML

JSON, XML, & YAML

Day 60

PreviousNetwork AutomationNextREST APIs

Last updated 1 year ago

Data serialization is the process of converting data into a serialized format/structure that can be stored or transmitted and reconstructed later. This allows the data to be communicated between applications in a way both applications understand. Data serialization languages allow us to represent variables with text. Variables are containers that store values.

JSON

JSON (JavaScript Object Notation) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects. REST APIs often use JSON. In JSON, whitespace is insignificant.

JSON primitive data types:

  • String - a text value. It is surrounded by double quotes (" ").

  • Number - a numeric value.

  • Boolean - data type that has only two possible values (true or false).

  • Null - represents the intentional absence of any object value (null).

JSON structured data types:

  • Object - an unordered list of key-value pairs (variables). Objects are surrounded by curly brackets ({}). The key is a string and the value is any valid JSON data type. The key and value are separated by a colon (:). If there are multiple key-value pairs, each pair is separated by a comma (,). Objects within objects are called nested objects.

  • Array - series of values separated by commas. The values don't have to be the same data type.

XML

XML (Extensible Markup Language) was developed as a markup language but is now used as a general data serialization language. Markup languages are used to format text. XML is less human-readable than JSON. The whitespace is insignificant. Used by REST APIs.

YAML

YAML originally meant Yet Another Markup Language but to distinguish its purpose as a data-serialization language rather than a markup language, it was repurposed to YAML Aint Markup Language. It is used by the network automation tool Ansible. It is very human-readable. Whitespace is significant, indentation is very important. YAML files start with ---. - is used to indicate a list. Keys and values are represented as key:value.

11KB
Day 60 Flashcards - JSON, XML, _ YAML.apkg
data serialization demo
object example
array example
XML example
YAML example