A network administrator retrieves interface state data from a Cisco IOS XE device using a RESTCONF GET request. Match each JSON key from the returned payload to its correct JSON data structure or data type based on standard JSON syntax rules.
{
"ietf-interfaces:interface": {
"name": "GigabitEthernet0/0/1",
"enabled": true,
"speed": 1000,
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.0.12.1",
"netmask": "255.255.255.0"
}
]
}
}
}
Which JSON data type or structure corresponds to each specified key?
- "enabled"Boolean value (true/false, unquoted)
- "speed"Number value (numeric integer, unquoted)
- "address"Array / List (enclosed in square brackets [ ])
- "ietf-ip:ipv4"Object / Dictionary (enclosed in curly braces { })
Answer
"enabled" matches Boolean value; "speed" matches Number value; "address" matches Array / List; "ietf-ip:ipv4" matches Object / Dictionary.
Each key in a JSON payload corresponds to a specific primitive data type or data structure: key "enabled" value `true` is a Boolean, key "speed" value `1000` is a Number, key "address" value `[...]` is an Array, and key "ietf-ip:ipv4" value `{...}` is a nested Object.
Step-by-Step Solution
Key Concept
JSON syntax data types (Strings, Numbers, Booleans, Objects, and Arrays)