I'm using JSON.NET to parse JSON data. I have got dynamic parsing using JObject class to work but I'm looking for a more efficient way. This is just the basics and my final solution will be much more complicated, but first thing's first, I need to get the basics.
So I have this JSON data...
{
"count":1,
"results": [{
"user_id":5029420,
"login_name":"EtsyStore",
"creation_tsz":1282269739,
"referred_by_user_id":null,
"feedback_info": {
"count":3038,
"score":100
}
}],
"params": {
"user_id":"etsystore"
},
"type":"User",
"pagination":{}
}
Here's my current code so far... I'd like to get the value of user_id under the results object.
Dim p1 = JObject.Parse(json)
Dim p2 = JObject.Parse(p1("results").ToString.Replace("[", "").Replace("]", ""))
MsgBox(p2("user_id"))
So I'm able to get the value of user_id but I don't think this is the most efficient way of doing it. Is there another way of doing it?