Which data format uses key-value pairs and is commonly returned by REST APIs?
Answer choices
Why each option matters
Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.
Distractor review
YANG
YANG is a modeling language, not the usual wire-format response body.
Best answer
JSON
JSON commonly represents API payloads.
Distractor review
Syslog
Syslog is a logging protocol and message format.
Distractor review
CDP
CDP is a Cisco discovery protocol.
Common exam trap
Common exam trap: answer the scenario, not the keyword
A frequent exam trap is mistaking YANG for the data format returned by REST APIs. YANG is a modeling language that defines the structure and constraints of network data, but it is not the actual data format transmitted over the network. Candidates might incorrectly select YANG because it is closely associated with network programmability. However, REST APIs typically return data in JSON format, which encodes the modeled data in a lightweight, readable way. Confusing these concepts can lead to incorrect answers, especially since YANG and JSON often work together in network automation but serve different roles.
Technical deep dive
How to think about this question
JSON (JavaScript Object Notation) is a lightweight, text-based data interchange format that uses key-value pairs to represent structured data. It is human-readable and easy for machines to parse and generate, making it ideal for data exchange in network automation and programmability contexts. JSON's syntax consists of objects enclosed in curly braces with keys and values, arrays, and simple data types like strings, numbers, and booleans, which enables flexible and hierarchical data representation. In the context of REST APIs, JSON is the most commonly used data format for request and response payloads because it is language-independent and widely supported by programming languages and network devices. Cisco devices and network management tools frequently use JSON to exchange configuration data, telemetry, and operational state information. Unlike YANG, which is a modeling language describing data structure, JSON is the actual format used to encode and transmit data over the network. A common exam trap is confusing YANG with JSON. YANG defines the schema and data models for network configuration and state data but does not specify the wire format. JSON is the wire format often used to encode YANG-modeled data in RESTCONF or NETCONF APIs. Understanding this distinction is critical for CCNA candidates, as REST APIs return JSON-formatted data, not YANG code. Practically, network engineers use JSON to automate device configuration and monitoring, leveraging its simplicity and compatibility with RESTful services.
KKey Concepts to Remember
- JSON uses key-value pairs to represent structured data in a lightweight and human-readable format suitable for network automation.
- REST APIs commonly return JSON-formatted data because it is language-independent and easy for devices and applications to parse.
- YANG is a data modeling language that defines the schema for network data but does not specify the wire-format for data exchange.
- Syslog is a protocol for logging system messages and is not used as a data format for REST API responses.
- CDP is a Cisco proprietary protocol for device discovery and does not provide data in key-value pair format for APIs.
- Network automation tools use JSON to encode configuration and operational data when interacting with Cisco devices via RESTCONF or NETCONF.
- Understanding the difference between data models (YANG) and data formats (JSON) is essential for correctly interpreting network programmability questions.
- REST APIs leverage JSON to enable efficient and standardized communication between network devices and management applications.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Related practice questions
Related 200-301 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
CCNA subnetting practice questions
Practise IPv4 subnetting, CIDR, masks, host ranges and subnet selection.
CCNA OSPF practice questions
Practise OSPF neighbours, router IDs, metrics, areas and routing-table interpretation.
CCNA VLAN practice questions
Practise VLANs, access ports, trunks, allowed VLANs and switching scenarios.
CCNA STP practice questions
Practise spanning tree, root bridge election, port roles and STP troubleshooting.
CCNA EtherChannel practice questions
Practise LACP, PAgP, port-channel behaviour and bundle requirements.
CCNA ACL practice questions
Practise standard and extended ACLs, permit/deny logic and traffic filtering.
CCNA NAT practice questions
Practise static NAT, dynamic NAT, PAT and inside/outside address translation.
CCNA DHCP practice questions
Practise DHCP scopes, relay, leases and troubleshooting.
CCNA show ip route practice questions
Practise routing-table output, longest-prefix match, AD and route selection.
CCNA show interfaces trunk practice questions
Practise trunk verification and VLAN forwarding across switches.
CCNA wireless security practice questions
Practise WLAN security, authentication and wireless architecture concepts.
CCNA IPv6 practice questions
Practise IPv6 addressing, routes, neighbour discovery and common IPv6 exam traps.
More questions from this exam
Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.
Question 1
A router learns the same prefix from both OSPF and EIGRP. Which route is installed by default?
Question 2
A router shows this output: R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.1.1.2 1 FULL/DR 00:00:34 192.168.12.2 GigabitEthernet0/0 10.1.1.3 1 2WAY/DROTHER 00:00:39 192.168.12.3 GigabitEthernet0/0 Which statement is correct?
Question 3
What is the OSPF metric called?
Question 4
A non-root switch has two uplinks toward the root bridge. One path has a lower total STP cost than the other. What role will the lower-cost uplink have?
Question 5
A router interface applies this ACL inbound: 10 deny tcp any any eq 80 20 permit ip any any A user reports that web browsing to a server by IP address fails, but ping works. Which statement best explains the behavior?
Question 6
A router learns route 198.51.100.0/24 from OSPF with AD 110 and also has a static route to the same prefix configured with AD 150. Which route is installed?
FAQ
Questions learners often ask
What does this 200-301 question test?
JSON uses key-value pairs to represent structured data in a lightweight and human-readable format suitable for network automation.
What is the correct answer to this question?
The correct answer is: JSON — JSON is lightweight, human-readable, and widely used in modern APIs for structured data exchange.
What should I do if I get this 200-301 question wrong?
Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.
Discussion
Sign in to join the discussion.