Anyone can help me using JSON Parse?

kiko2max

New member
Joined
May 8, 2013
Messages
1
Programming Experience
Beginner
I'm making a system that getting a JSON response using url stream. to get the response I parse it, now i need to get the name and value inside it...

the JSON response looks like this:

{
"status": true,
"data": {
"2": "Affidavit of Acknowledgement",
"3": "Affidavit of Assurance",
"45": "Affidavit of Assurance for Ex-KSA",
"46": "Affidavit of Assurance for Fingerprints",
"55": "Affidavit of Declaration and Consent",
"48": "Affidavit of Undertaking for MODA",
"47": "Affidavit of Undertaking for Visa Usage",
"1": "Airline Ticket"
}
}

then my codes is like this...


Dim rawresp As String
rawresp = reader.ReadToEnd()
Dim data As New ArrayList

Dim jResults As JObject = JObject.Parse(rawresp)

For Each PT As JProperty In jResults.Properties()

data.Add(PT.Name)


Next

For i = 0 To data.Count - 1
DocuType.Items.Add(data(i))
Next


which have an output of in the listbox:

status
data

now i also want to get the collection inside the "data", how can i get the value there?... can you help me?
 
First of all, when using third party libraries you should explain that and don't leave it for reader to guess. I'm guessing you're using this Json.net library.
For Each prop As JProperty In jResults("data")
 
Back
Top