myITforum and Windows IT Pro Forums
Forum Themes:
Welcome !

 Parsing JSON

Author Message
gofightwinmsu

  • Total Posts : 4
  • Scores: 0
  • Reward points : 950
  • Joined: 9/13/2016
  • Status: offline
Parsing JSON Monday, November 07, 2016 10:34 AM (permalink)
0
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"
  }]
 }
}
Attachment(s)Parse JSON.txt (2.07 KB) - downloaded 34 times
 
#1
    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2017 ASPPlayground.NET Forum Version 3.9