I'?m struggling with parsing JSON data that was returned from a web service call. Below is a copy of the JSON. I?m using YAJL programs that were retrieved from Scott Klement's website. I can successfully read the values for MessageID, MessageType, MessageTime, ApiVersion, but when I get to the Payload item, I'm not able to parse any additional information. If I remove Payload from the JSON file then I can parse the entire JSON file including the Msg & Severity elements in the ResponseMessages array. What is different about Payload object in the JSON format that prevents me from parsing the JSON data?
When I use the YAJL_object_find(docNode: 'Payload') function a null value is returned. Any help is appreciated.
Take care,
Doug
{
"MessageId": "780f064a-4060-4197-a8d7-fa4c6fa8dbf0",
"MessageType": "LoadLocation",
"MessageTime": "2016-11-04T14:46:02.3266448+00:00",
"ApiVersion": "1.1",
"Payload": {
"ResponseMessages": [{
"Msg": "Message Received and Queued for Processing.",
"Severity": "INFORMATION"
}]
}
}
When I use the YAJL_object_find(docNode: 'Payload') function a null value is returned. Any help is appreciated.
Take care,
Doug
{
"MessageId": "780f064a-4060-4197-a8d7-fa4c6fa8dbf0",
"MessageType": "LoadLocation",
"MessageTime": "2016-11-04T14:46:02.3266448+00:00",
"ApiVersion": "1.1",
"Payload": {
"ResponseMessages": [{
"Msg": "Message Received and Queued for Processing.",
"Severity": "INFORMATION"
}]
}
}
Comment