Courseiva
AI and Network OperationseasyMultiple ChoiceObjective-mapped

CCNA AI and Network Operations Practice Question

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

⚠ Common exam trap

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.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

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.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • YANG

    Why it's wrong here

    YANG (Yet Another Next Generation) is a data modeling language used to describe the configuration and state data of network devices, primarily for NETCONF and RESTCONF protocols. It defines the structure of data, not how that data is serialized on the wire; REST APIs generally use JSON or XML as the actual data format, so YANG is a modeling framework rather than a format for API messages.

    When this WOULD be correct

    If the exam question asked for a data format used in network configuration protocols or data modeling languages, YANG would be the correct answer, as it is specifically designed for those purposes.

  • JSON

    Why this is correct

    JSON is the standard data-interchange format for REST APIs because it is lightweight, human-readable, and natively supported by JavaScript, making it trivial to parse in browsers and servers. It represents structured data as key-value pairs and arrays, mirroring the object literal syntax of many programming languages, and is transmitted with the Content-Type: application/json header. Its low overhead and easy mapping to language objects make it the default choice for most modern web APIs.

  • STP

    Why it's wrong here

    STP (Spanning Tree Protocol) is a Layer 2 protocol that prevents loops in Ethernet networks by dynamically blocking redundant paths and negotiating a loop-free topology. It operates on switches and bridges, dealing with BPDUs and port states, and has nothing to do with data serialization or the payload format of REST APIs, making it entirely irrelevant to this question.

    When this WOULD be correct

    If the exam question asked about protocols used in network communications or data link layer technologies, STP could be the correct answer when discussing methods to manage network topology and prevent broadcast storms.

  • TFTP

    Why it's wrong here

    TFTP (Trivial File Transfer Protocol) is a network protocol used to transfer files, typically over UDP port 69, and is commonly employed for bootstrapping diskless devices or copying configuration files to network hardware. It is not a data format at all — it is a transport mechanism, so it cannot be used to represent the structure of a REST API request or response body.

    When this WOULD be correct

    If the exam question asked about protocols used for transferring files in a network environment, TFTP could be the correct answer. For example, a question could specify which protocol is best suited for simple file transfers in a low-overhead scenario.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.

JSONCorrect answer

Why this is correct

JSON is the standard data-interchange format for REST APIs because it is lightweight, human-readable, and natively supported by JavaScript, making it trivial to parse in browsers and servers. It represents structured data as key-value pairs and arrays, mirroring the object literal syntax of many programming languages, and is transmitted with the Content-Type: application/json header. Its low overhead and easy mapping to language objects make it the default choice for most modern web APIs.

YANGWrong answer — click to see why

Why this is wrong here

YANG is a data modeling language used for defining data structures in network configurations, not a data format for REST APIs. It is not lightweight or designed for easy parsing by applications like JSON.

★ When this WOULD be the correct answer

If the exam question asked for a data format used in network configuration protocols or data modeling languages, YANG would be the correct answer, as it is specifically designed for those purposes.

Why candidates choose this

Candidates may confuse YANG with JSON due to their roles in data handling; they might recall YANG's relevance in network contexts and mistakenly associate it with REST API data formats.

STPWrong answer — click to see why

Why this is wrong here

C: STP (Spanning Tree Protocol) is a network protocol used for preventing loops in Ethernet networks, not a data format. It is unrelated to REST APIs and data interchange formats.

★ When this WOULD be the correct answer

If the exam question asked about protocols used in network communications or data link layer technologies, STP could be the correct answer when discussing methods to manage network topology and prevent broadcast storms.

Why candidates choose this

Candidates may confuse STP with data formats due to its acronym and association with network technologies, leading them to mistakenly believe it could relate to data interchange in APIs.

TFTPWrong answer — click to see why

Why this is wrong here

TFTP (Trivial File Transfer Protocol) is a protocol used for transferring files over a network, not a data format. It does not serve as a lightweight data interchange format like JSON in REST APIs.

★ When this WOULD be the correct answer

If the exam question asked about protocols used for transferring files in a network environment, TFTP could be the correct answer. For example, a question could specify which protocol is best suited for simple file transfers in a low-overhead scenario.

Why candidates choose this

Candidates might confuse TFTP with data formats due to its association with data transfer, leading them to mistakenly believe it relates to data interchange formats like JSON.

Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

SW1 Root Bridge SW2 SW3 BLK DP DP RP RP STP blocks one link to prevent loops DP = Designated Port RP = Root Port BLK = Blocked

About these practice questions

This 200-301 question is part of Courseiva's 1,389-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-301 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-301 exam.