Implementing and Operating Cisco Enterprise Network Core Technologies (ENCOR) v1.2AutomationEasy
A network automation engineer is building a system to provision network services using an orchestration tool. The tool needs to interact with various network devices and cloud services, each exposing different APIs (REST, NETCONF, SOAP). To ensure consistent data representation and simplified integration, the engineer decides to use a standardized, human-readable data serialization format that is widely supported across web services and modern APIs. Which data format should the engineer choose?
- ACSV
- BYAML
- CJSON
- DXML
Show answer & explanationAnswer & explanation
Correct answer: C. JSON
JSON (JavaScript Object Notation) is a lightweight, human-readable data interchange format widely used for web services and APIs due to its simplicity, broad support across programming languages, and native compatibility with JavaScript. It is the most common choice for modern REST APIs.
Why the other options are wrong
- A. CSV is a simple tabular data format, unsuitable for complex hierarchical data structures required by many APIs.
- B. YAML is also human-readable and used for configuration, but JSON is more prevalent for data interchange in web APIs.
- D. XML is a structured data format but is often considered more verbose and complex than JSON for typical API interactions.
JSON (JavaScript Object Notation)
A lightweight, text-based, language-independent data interchange format that is easy for humans to read and write and easy for machines to parse and generate.
- Uses key-value pairs and ordered lists.
- Widely adopted for REST APIs.
- Native support in JavaScript, easily parsed by other languages.
Memory trick: For API data, 'JSON' is the 'just-on' choice for simplicity.