ExamOpsPractice free

Cisco Certified Network Associate (CCNA) 200-301 · Free study guide

Objective 6.7 — Interpret JSON data

JSON represents structured data with objects, arrays, and primitive values. It is common in API requests and responses because programs can parse its explicit structure. Correct interpretation depends on following nesting and value types, not on how a browser happens to indent the text.

Recognize the value types

An object uses braces and contains string keys mapped to values. An array uses brackets and contains ordered values. Strings use double quotes. Numbers do not. The lowercase literals true, false, and null represent boolean and null values. JSON has no comments, and trailing commas are invalid.

These distinctions affect behavior. The string "false" is text and is not the boolean false. The string "22" may look numeric but is not a number until an application deliberately converts it. null indicates an explicit null value; it is not the same as an omitted key or an empty string unless an API contract says so.

Trace nesting one level at a time

Consider a synthetic payload with the following parsed paths and values:

JSON pathValueType
device"edge-07"string
interfaces[0].name"GigabitEthernet0/1"string
interfaces[0].enabledtrueboolean
interfaces[0].errors0number
interfaces[1].name"GigabitEthernet0/2"string
interfaces[1].enabledfalseboolean
interfaces[1].errors14number
nextPagenullnull

The top value is an object. interfaces maps to an array of two objects. The second object's enabled value is a boolean and errors is a number. nextPage exists but has a null value. Do not claim there is a third interface or interpret disabled state from the error counter alone.

Connect syntax to an API contract

Valid JSON can still be wrong for an API. A field may be misspelled, have the wrong type, fall outside an allowed range, or appear in the wrong object. Schema and endpoint documentation define required fields and semantics. An object is not inherently ordered for business logic; arrays are ordered, although the meaning of that order depends on the contract.

JSON is an encoding, not encryption, authentication, or authorization. Sensitive values remain sensitive when placed in JSON. Use protected transport and avoid logging tokens, passwords, or private configuration.

Worked scenario

An automation check expects enabled to be a boolean but receives the string "false". In some languages, any nonempty string evaluates as truthy, so a careless condition could treat the interface as enabled. Validate the response against its schema and compare the exact type before making a network decision.

Verification evidence

Parse the entire document with a JSON parser, validate required keys and types, handle absent and null values explicitly, and test empty arrays and nested error responses. Use redacted fixtures for repeatable tests. Compare the parsed value with authoritative device state when it drives an operational decision.

Common traps

Readiness checklist

Practice and apply this objective

A free ExamOps account includes guided hands-on labs plus 10 practice questions per day shared across live tracks, with a written explanation on every question. No card required.

Start practicing free