我需要帮助将json数据发送到我的vb.net

时间:2015-02-19 19:42:43

标签: json vb.net

我有以下代码,使用Newtonsoft.Json:

 Dim address2 As String = 
 "https://euw.api.pvp.net/api/lol/euw/v2.5/league/by-summoner/" 
                                  & FlatLabel7.Text & "/entry?api_key=API KEY"
 Dim client2 As WebClient = New WebClient()
 Dim reader2 As StreamReader = New StreamReader(client2.OpenRead(address2))
 Dim json2 As JObject = JObject.Parse(reader2.ReadToEnd)
 FlatTextBox2.Text = json2.SelectToken(FlatLabel7.Text).SelectToken("tier")

但它没有找到"等级"。

json是这样的:

    {"28170580": [{  
   "queue": "RANKED_SOLO_5x5",  
   "name": "Name"  
   "entries": [{  
      "leaguePoints": 54,  
      "isFreshBlood": false,  
      "isHotStreak": false,  
      "division": "I",  
      "isInactive": false,  
      "isVeteran": false,  
      "losses": 32,  
      "playerOrTeamName": "asdfasda",  
      "playerOrTeamId": "ffdsfsaf",  
      "wins": 34  
   }],  
   "tier": "SILVER"  
}]}

我认为它是因为它必须在进入"等级#34之前进入[0],但我不知道该怎么做。

提前致谢。

0 个答案:

没有答案