Parsing JSON

Author
gofightwinmsu
New Member
  • Total Posts : 4
  • Scores: 0
  • Reward points: 950
  • Joined: 2016/09/13 14:31:34
  • Status: offline
2016/11/07 09:34:55 (permalink)
0

Parsing JSON

I’m not very familiar with JSON, but it seems pretty simple and basic, yet I’m struggling with parsing the JSON data that is returned from the load location request.   The JSON that I'm trying to parse is copied below.
    
I’m using YAJL programs from Scott Klement's website to read the JSON file.  I've attached a copy of the RPG program. 
 
I'm able to read/parse 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 then I can read/parse the entire file including the Msg & Severity elements in the ResponseMessages array.  Do you know what is different about Payload in the JSON format that prevents me from parsing the JSON data?  Any help is appreciated.
 
{
 "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"
  }]
 }
}
#1

0 Replies Related Threads

    Jump to:
    © 2018 APG vNext Commercial Version 5.5