Hi.
Below I have logged into the Junos CLI and request some information in JSON format.
lab@vmx1> show system information | display json
{
"system-information" : [
{
"hardware-model" : [
{
"data" : "vmx"
}
],
"os-name" : [
{
"data" : "junos"
}
],
"os-version" : [
{
"data" : "18.3R1.9"
}
],
"serial-number" : [
{
"data" : "VM5C8C145200"
}
],
"host-name" : [
{
"data" : "vmx1"
}
]
}
]
}
My understanding is that Junos responds to the operational command in XML, which is then converted by the CLI into JSON.
Now I'm retrieving the same JSON information, but this time from my management station using RESTful messages:
[lab@desktop ~]$ curl http://10.10.1.1:3000/rpc/get-system-information -u "lab:lab123" -H "Accept: application/json"
{
"system-information" : [
{
"hardware-model" : [
{
"data" : "vmx"
}
],
"os-name" : [
{
"data" : "junos"
}
],
"os-version" : [
{
"data" : "18.3R1.9"
}
],
"serial-number" : [
{
"data" : "VM5C8C145200"
}
],
"host-name" : [
{
"data" : "vmx1"
}
]
}
]
}
My question is: Who is doing the XML->JSON conversion here? Is it still the Junos CLI?
Thanks,
Deepak
Juniper Business Use Only