On This Page
JSON Single Element Array
Due to a known limitation in the JSON parser used in SecureChange and SecureApp, arrays containing a single element will be returned as an object rather a single element array.
For example, a single device array will be returned as:
{"devices":
{"device": {
"id": 553,
"name": "asa_device_name",
"ip": "",
"vendor": "Cisco",
"device_type": "asa"
}
}
}
While an array with two devices will be returned as:
{"devices":
{"device": [
{
"id": 553,
"name": "asa_device_name",
"ip": "",
"vendor": "Cisco",
"device_type": "asa"
},
{
"id": 2,
"name": "cisco_device_name",
"ip": "",
"vendor": "Cisco",
"device_type": "router"
}
]
}
}