A network technician uses a REST API call to retrieve VLAN configuration data from a Cisco switch. The device returns the following JSON payload:
{
"response": {
"vlan_list": [
{
"vlan_id": 10,
"name": "Management",
"active": true
},
{
"vlan_id": 20,
"name": "Engineering",
"active": false
}
],
"total_vlans": 2
}
}
Based on this JSON payload, which of the following statements are correct? (Select TWO.)
- The key "vlan_list" contains an array of JSON objects enclosed in square brackets.Answer
- The value for the key "active" in the "Engineering" VLAN object is an unquoted boolean data type.Answer
- CThe key "total_vlans" holds a string data type value.
- DThe key "vlan_list" directly maps to a single dictionary object enclosed in curly braces.
Answer
The key "vlan_list" contains an array of JSON objects, and the value for "active" in the Engineering VLAN is a boolean data type.
The payload uses square brackets `[]` under `vlan_list` to represent an array of objects. Additionally, the value `false` assigned to `active` is unquoted, which correctly identifies it as a native JSON boolean data type.
Step-by-Step Solution
Key Concept
Interpreting JSON syntax elements including arrays, objects, strings, numbers, and boolean data types.