Cisco Certified Support Technician (CCST) NetworkingAutomation and ProgrammabilityMedium

A network engineer is using a script to configure VLANs on multiple switches through a network controller's REST API. The script sends JSON payloads containing the desired VLAN configurations. Which data format is commonly used for representing structured data when interacting with REST APIs?

  1. AHTML
  2. BYAML
  3. CXML
  4. DJSON
Show answer & explanation

Correct answer: D. JSON

JSON (JavaScript Object Notation) is the most widely adopted data format for representing structured data in modern web APIs, including RESTful APIs, due to its lightweight nature and ease of parsing by both humans and machines.

Why the other options are wrong

  • A. HTML is primarily for structuring web page content, not for API data exchange.
  • B. YAML (YAML Ain't Markup Language) is often used for configuration files but less commonly as the primary data exchange format for REST APIs compared to JSON.
  • C. XML (Extensible Markup Language) was previously common but has largely been supplanted by JSON in many REST API contexts.

JSON (JavaScript Object Notation)

A lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is widely used for transmitting data in web applications.

  • Human-readable and machine-parseable
  • Uses key-value pairs and arrays
  • Commonly used in REST APIs for data exchange

Memory trick: APIs speak in structured data languages.

More Automation and Programmability questions