A network engineer performs an HTTP GET request to a Cisco IOS XE RESTCONF interface configuration endpoint. The server returns the following JSON payload:
{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "GigabitEthernet0/0/0",
"type": "iana-if-type:ethernetCsmacd",
"enabled": "true",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.10.1",
"netmask": "255.255.255.0"
}
]
}
},
{
"name": "GigabitEthernet0/0/1",
"type": "iana-if-type:ethernetCsmacd",
"enabled": false,
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.0.1.1",
"netmask": "255.255.255.252"
}
]
}
}
]
}
}
Which TWO statements accurately interpret the structure and data types in this JSON payload?
- The key path payload["ietf-interfaces:interfaces"]["interface"][0]["enabled"] evaluates to a String data type rather than a Boolean primitive.Answer
- The path expression payload["ietf-interfaces:interfaces"]["interface"][1]["ietf-ip:ipv4"]["address"][0]["ip"] resolves to the IP address "10.0.1.1".Answer
- CThe element mapped to payload["ietf-interfaces:interfaces"]["interface"][0]["ietf-ip:ipv4"]["address"] is a JSON Object (dictionary).
- DThe expression payload["ietf-interfaces:interfaces"]["interface"][0]["name"] extracts the interface name "GigabitEthernet0/0/1".