Courseiva
AI and Network OperationseasyMultiple ChoiceObjective-mapped

CCNA AI and Network Operations Practice Question

Which data format uses key-value pairs and is commonly returned by REST APIs?

⚠ Common exam trap

Be careful not to confuse JSON with XML or YAML, which have different structures and use cases.

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 a lightweight, human-readable data format that uses key-value pairs and is the most common format returned by REST APIs. YANG is a data modeling language used for configuration and state data, not a data format. Syslog is a logging protocol used for system messages. CDP (Cisco Discovery Protocol) is a Layer 2 discovery protocol for Cisco devices. None of these are key-value pair data formats typically returned by REST APIs.

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 is a modeling language, not the usual wire-format response body.

    When this WOULD be correct

    If the question asked which data modeling language is used for network device configuration and management, YANG would be the correct answer. This scenario would focus on network protocols and data structure definitions rather than API responses.

  • JSON

    Why this is correct

    JSON commonly represents API payloads.

  • Syslog

    Why it's wrong here

    Syslog is a logging protocol and message format.

    When this WOULD be correct

    If the question were to ask about a logging format used for network devices that can include key-value pairs in its extended format, Syslog could be the correct answer. For example, a question about logging protocols that support structured data might fit this scenario.

  • CDP

    Why it's wrong here

    CDP is a Cisco discovery protocol.

    When this WOULD be correct

    If the exam question asked about protocols used for device discovery in a Cisco network environment, CDP would be the correct answer, as it is specifically designed for that purpose.

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 commonly represents API payloads.

YANGWrong answer — click to see why

Why this is wrong here

YANG is a data modeling language used to define the structure of configuration and state data, not a data format for API responses. REST APIs typically return data in JSON or XML, not YANG models.

★ When this WOULD be the correct answer

If the question asked which data modeling language is used for network device configuration and management, YANG would be the correct answer. This scenario would focus on network protocols and data structure definitions rather than API responses.

Why candidates choose this

Students may confuse YANG with JSON because both are used in network automation and RESTCONF/NETCONF APIs, but YANG defines the schema while JSON is the actual wire format.

SyslogWrong answer — click to see why

Why this is wrong here

Syslog is a protocol and message format for logging system events, not a data format for API responses. It uses a specific structured format with facility, severity, and message fields, but not key-value pairs like JSON.

★ When this WOULD be the correct answer

If the question were to ask about a logging format used for network devices that can include key-value pairs in its extended format, Syslog could be the correct answer. For example, a question about logging protocols that support structured data might fit this scenario.

Why candidates choose this

Students might think syslog uses key-value pairs because some syslog messages include structured data, but the standard syslog format is not key-value based and is not used for REST API responses.

CDPWrong answer — click to see why

Why this is wrong here

CDP (Cisco Discovery Protocol) is a proprietary Layer 2 protocol used by Cisco devices to discover neighboring devices, not a data format. It does not use key-value pairs and is not returned by REST APIs.

★ When this WOULD be the correct answer

If the exam question asked about protocols used for device discovery in a Cisco network environment, CDP would be the correct answer, as it is specifically designed for that purpose.

Why candidates choose this

The acronym CDP might be confused with JSON because both are related to network data, but CDP is a discovery protocol, not a data format. Students may also confuse it with other protocols like LLDP.

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?”

About these practice questions

One of 1,389 original 200-301 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.