I have spent more time than I’m will to admit trying to parse this JSON string. I get the two values but have not figured out how to cycle through the Readings. I have been working with the built in Xojo classes, JSONMBS and Kem’s JSONItem_MTC. The last two seem easier to work with as they don’t require everything to be converted to text (I will have some binary data to work with later that will be sent using EncodeBase64 and don’t know what converting that to text will do so I would prefer not to bother with it.)
{
"FacilityID":54321,
"FacCode":"12345",
"Readings":[
{
"MeterNo":"1",
"When":"2019-02-26 11:27:54",
"Reading":"1765"
},
{
"MeterNo":"2",
"When":"2019-02-26 11:28:19",
"Reading":"962"
},
{
"MeterNo":"3",
"When":"2019-02-26 11:30:26",
"Reading":"2100"
}
]
}