Product/components used and version/fix level are you on:
Detailed explanation of the problem:
Hi Team,
I am trying to read result of c8y_command operation performed on my device, my device sends stringfy JSON data to cumulocity cloud as below.
‘{“status”:200,“data”:[{“time”:“2023-04-21T11:28:59.752429531Z”,“ackedTime”:“null”,“acknowledged”:false,“pointId”:“1”,“pointType”:“1”,“deviceId”:“140”,“deviceType”:“8”,“deviceName”:“BACnet/IP Device 140”,“mostRecentOccurence”:“2023/4/21 16:58:27:0”,“objectName”:“Object 1 1”,“priority”:2,“ackRequired”:0,“triggeredValue”:2,“recordId”:“a127792b-fb4b-4c72-bfff-bb392e8f076e”,“timestampType”:“2.0”,“weekday”:“5.0”,“eventType”:“Out Of Range”,“state”:“LowLimit”,“count”:2,“unit”:“No units”,“protocolType”:“BACnet”},{“time”:“2023-04-21T09:31:49.69681266Z”,“ackedTime”:“null”,“acknowledged”:false,“pointId”:“0”,“pointType”:“4”,“deviceId”:“77”,“deviceType”:“8”,“deviceName”:“BACnet/IP Device 77”,“mostRecentOccurence”:“2023/4/21 14:57:17:0”,“objectName”:“Object 4 0”,“priority”:2,“ackRequired”:1,“triggeredValue”:1,“recordId”:“f9a90664-ebd8-4208-856e-54e4f16b5c41”,“timestampType”:“2.0”,“weekday”:“5.0”,“eventType”:“Command Failure”,“state”:“Offnormal”,“count”:1,“unit”:“”,“protocolType”:“BACnet”},{“time”:“2023-04-21T09:31:10.330302972Z”,“ackedTime”:“null”,“acknowledged”:false,“pointId”:“0”,“pointType”:“1”,“deviceId”:“77”,“deviceType”:“8”,“deviceName”:“BACnet/IP Device 77”,“mostRecentOccurence”:“2023/4/21 14:56:26:0”,“objectName”:“Object 1 0”,“priority”:2,“ackRequired”:1,“triggeredValue”:120,“recordId”:“8c5ae43b-ffe8-4e7c-be5c-bd3173e27d1e”,“timestampType”:“2.0”,“weekday”:“5.0”,“eventType”:“Out Of Range”,“state”:“HighLimit”,“count”:2,“unit”:“No units”,“protocolType”:“BACnet”},{“time”:“2023-04-21T09:28:33.876507133Z”,“ackedTime”:“null”,“acknowledged”:false,“pointId”:“0”,“pointType”:“2”,“deviceId”:“77”,“deviceType”:“8”,“deviceName”:“BACnet/IP Device 77”,“mostRecentOccurence”:“2023/4/21 14:54:1:0”,“objectName”:“Object 2 0”,“priority”:2,“ackRequired”:0,“triggeredValue”:10,“recordId”:“b56d4019-25c8-44f3-8925-0ab499cfd0d8”,“timestampType”:“2.0”,“weekday”:“5.0”,“eventType”:“Out Of Range”,“state”:“LowLimit”,“count”:1,“unit”:“No units”,“protocolType”:“BACnet”}]}’
But same data when is try to read using operation service it becomes simple string.
“{status:200;data:[{time:2023-04-21T11:28:59.752429531Z;ackedTime:null;acknowledged:false;pointId:1;pointType:1;deviceId:140;deviceType:8;deviceName:BACnet/IP Device 140;mostRecentOccurence:2023/4/21 16:58:27:0;objectName:Object 1 1;priority:2;ackRequired:0;triggeredValue:2;recordId:a127792b-fb4b-4c72-bfff-bb392e8f076e;timestampType:2.0;weekday:5.0;eventType:Out Of Range;state:LowLimit;count:2;unit:No units;protocolType:BACnet};{time:2023-04-21T09:31:49.69681266Z;ackedTime:null;acknowledged:false;pointId:0;pointType:4;deviceId:77;deviceType:8;deviceName:BACnet/IP Device 77;mostRecentOccurence:2023/4/21 14:57:17:0;objectName:Object 4 0;priority:2;ackRequired:1;triggeredValue:1;recordId:f9a90664-ebd8-4208-856e-54e4f16b5c41;timestampType:2.0;weekday:5.0;eventType:Command Failure;state:Offnormal;count:1;unit:;protocolType:BACnet};{time:2023-04-21T09:31:10.330302972Z;ackedTime:null;acknowledged:false;pointId:0;pointType:1;deviceId:77;deviceType:8;deviceName:BACnet/IP Device 77;mostRecentOccurence:2023/4/21 14:56:26:0;objectName:Object 1 0;priority:2;ackRequired:1;triggeredValue:120;recordId:8c5ae43b-ffe8-4e7c-be5c-bd3173e27d1e;timestampType:2.0;weekday:5.0;eventType:Out Of Range;state:HighLimit;count:2;unit:No units;protocolType:BACnet};{time:2023-04-21T09:28:33.876507133Z;ackedTime:null;acknowledged:false;pointId:0;pointType:2;deviceId:77;deviceType:8;deviceName:BACnet/IP Device 77;mostRecentOccurence:2023/4/21 14:54:1:0;objectName:Object 2 0;priority:2;ackRequired:0;triggeredValue:10;recordId:b56d4019-25c8-44f3-8925-0ab499cfd0d8;timestampType:2.0;weekday:5.0;eventType:Out Of Range;state:LowLimit;count:1;unit:No units;protocolType:BACnet}]}”
Can any body help me to know how can i parse this operation service response as JSON.