Hi,
I have created a property of a device as below JOSN data
{
"registers": [
{
"address": 40001,
"byte_order": "ABCD",
"name": "Voltage",
"type": "float"
},
{
"address": 40003,
"byte_order": "ABCD",
"name": "Current",
"type": "float"
}]
}
I have gone through this topic How to handle PSON what has array of objects? - #2 by mikko_virta
and able to read address data. However could not extract text data. Please let me know how to extract text or string from PSON data, tried following codes
if (data.is_object())
{
pchar= data["byte_order"]; //error while compiling
Serial.println(data["byte_order"]);
}
else
{
Serial.println("Array item wasn't object");
}
thanks