I have a basic understanding of JSON, but clearly not enough.
I am able to create a messagebox with "ID" from this JSON
with the following vb.net codeCode:{ "profileIconId": 0000, "name": "name", "id": 12345678, }
That's the easy part.Code:Dim json As JObject = JObject.Parse(returnData) MsgBox(json.SelectToken("id"))
I am unable to display "tier" because there are two tokens by the name "tier". Here's the JSON (stripped down for easier reading)
I've tried the following in multiple different fasions to no avail.Code:[ { "queueType": "RANKED_FLEX_SR", "rank": "III", "tier": "BRONZE", "leaguePoints": 5 }, { "queueType": "RANKED_SOLO_5x5", "rank": "III", "tier": "SILVER", "leaguePoints": 22 } ]
Code:Dim json As JObject = JObject.Parse(returnData) MsgBox(json.SelectToken(1).SelectToken("tier"))
I wanted to learn how APIs worked so I went with a game I was familiar with, LoL. I've got the webrequests down (EASY MONEY) now I'm teaching myself what I can do with the information.




Reply With Quote
