Which data format is most commonly used in REST APIs because it is lightweight and easy for applications to parse?
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
Distractor.
Best answer
JSON
Correct choice.
Distractor review
STP
Distractor.
Distractor review
TFTP
Distractor.
Common exam trap
Common exam trap: answer the scenario, not the keyword
A common exam trap is selecting YANG as the data format for REST APIs because candidates recognize YANG as related to network automation. However, YANG is a data modeling language that defines the structure of data but does not represent the actual data format used in REST API communication. Confusing YANG with JSON leads to incorrect answers. Similarly, confusing protocols like STP or TFTP with data formats can mislead candidates. The key is to remember that JSON is the actual data format used in REST APIs due to its lightweight and easy-to-parse nature.
Technical deep dive
How to think about this question
JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write, and easy for machines to parse and generate. It represents data as key-value pairs and arrays, making it highly flexible for representing complex data structures. In the context of REST APIs, JSON is the preferred format because it is text-based, compact, and language-independent, which facilitates communication between diverse systems and applications. REST APIs use HTTP methods to perform operations on resources, and JSON is commonly used as the payload format for these operations. Cisco network automation and programmability workflows leverage REST APIs with JSON to configure devices, retrieve operational data, and integrate with network controllers. The decision to use JSON over other formats like XML or YANG is based on its simplicity and widespread support in programming languages and network management tools. A common exam trap is confusing JSON with other network-related protocols or data models such as YANG, which is a data modeling language used in NETCONF and RESTCONF but not the actual data format for REST API payloads. JSON’s practical behavior in Cisco automation is to enable efficient parsing and generation of configuration and telemetry data, making it essential for candidates to distinguish JSON as the data format rather than a protocol or model.
KKey Concepts to Remember
- JSON is a lightweight, text-based data format that represents data as key-value pairs and arrays, making it easy to parse and generate.
- REST APIs commonly use JSON as the data format because it is compact, human-readable, and supported by most programming languages and network tools.
- Cisco network automation workflows use JSON-formatted REST API payloads to configure devices and retrieve operational data efficiently.
- YANG is a data modeling language used to define the structure of network configuration and state data but is not the data format used in REST API payloads.
- STP (Spanning Tree Protocol) is a Layer 2 protocol for preventing loops and is unrelated to data formatting in REST APIs.
- TFTP is a simple file transfer protocol used for transferring files like IOS images and is not a data format for REST APIs.
- Understanding the difference between data formats (JSON) and data models (YANG) is critical for correctly answering automation and programmability questions on the CCNA exam.
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 is a lightweight, text-based data format that represents data as key-value pairs and arrays, making it easy to parse and generate.
What is the correct answer to this question?
The correct answer is: JSON — JSON is widely used with REST because it is compact, human-readable, and easy for software to parse. It is common in controller APIs and automation workflows.
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.