When trying to parse the JSON responses from API, I’m getting a few errors. I’ve mapped your responses to classes in C# and am trying to deserialize them with Newtonsoft’s Json.NET, but in a few responses I’m getting improperly formatted JSON.
For example, in this response, the Status.message value has improperly escaped quotations.
{
"CallDisconnectResult": {},
"Status": {
"message": "Result reason: "Must be in meeting to disconnect"",
"state": "Error"
},
"Sync": true,
"topKey": "CallDisconnectResult",
"type": "zCommand"
}
Double quotes need to be properly escaped with backslashes when inside a JSON string.
I’m also running into issues with the “zStatus Video Camera Line” command which has unescaped backslashes in it: “\?\usb#vid_25c1&pid_000d&mi_00#6&bf5c205&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global”. This causes Newtonsoft to try to interpret \u… as an escaped unicode sequence rather than the literal “\usb”.