easymultiple choiceObjective-mapped

Which data format is most commonly used in REST APIs because it is lightweight and easy for applications to parse?

Question 1easymultiple choice
Full question →

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.

A

Distractor review

YANG

Distractor.

B

Best answer

JSON

Correct choice.

C

Distractor review

STP

Distractor.

D

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.

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.

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

Loading comments…

Sign in to join the discussion.