Настоящая проблема здесь заключается в том, что вы пытаетесь десериализовать в список, но ваш JSON фактически представляет один объект, содержащий свойство данных, которое затем содержит список объектов.Вот почему вы получаете эту ошибку.Json.Net не может десериализовать отдельный объект в список.Я думаю, что вы действительно хотите сделать, это определить класс контейнера
Public Class Metdata
Public Property myDictionary As List(Of Dictionary(Of String, Object))
End Class
И тогда ваша подпрограмма будет выглядеть так:
Private Sub Weather_Load(sender As Object, e As EventArgs) 'Handles MyBase.Load
Dim uriString As String = "http://ws1.metcheck.com/ENGINE/v9_0/json.asp?lat=52.6&lon=-2&lid=60883&Fc=No"
Dim uri As New Uri(uriString)
Dim request As HttpWebRequest = HttpWebRequest.Create(uri)
request.Method = "GET"
Dim response As HttpWebResponse = request.GetResponse()
Dim read As New StreamReader(response.GetResponseStream())
Dim raw As String = read.ReadToEnd
Dim dict As Metdata
dict = JsonConvert.DeserializeObject(Of Metdata)(raw)
End Sub
Partial Public Class Metdata
Public Property myDictionary As List(Of Dictionary(Of String, Object))
End Class
Public Class Forecast
<JsonProperty("temperature")>
Public Property Temperature As String
<JsonProperty("dewpoint")>
Public Property Dewpoint As String
<JsonProperty("rain")>
Public Property Rain As String
<JsonProperty("freezinglevel")>
Public Property Freezinglevel As String
<JsonProperty("uvIndex")>
Public Property UvIndex As String
<JsonProperty("totalcloud")>
Public Property Totalcloud As String
<JsonProperty("lowcloud")>
Public Property Lowcloud As String
<JsonProperty("medcloud")>
Public Property Medcloud As String
<JsonProperty("highcloud")>
Public Property Highcloud As String
<JsonProperty("humidity")>
Public Property Humidity As String
<JsonProperty("windspeed")>
Public Property Windspeed As String
<JsonProperty("meansealevelpressure")>
Public Property Meansealevelpressure As String
<JsonProperty("windgustspeed")>
Public Property Windgustspeed As String
<JsonProperty("winddirection")>
Public Property Winddirection As String
<JsonProperty("windletter")>
Public Property Windletter As String
<JsonProperty("icon")>
Public Property Icon As String
<JsonProperty("iconName")>
Public Property IconName As String
<JsonProperty("chanceofrain")>
Public Property Chanceofrain As String
<JsonProperty("chanceofsnow")>
Public Property Chanceofsnow As String
<JsonProperty("dayOfWeek")>
Public Property DayOfWeek As String
<JsonProperty("weekday")>
Public Property Weekday As String
<JsonProperty("sunrise")>
Public Property Sunrise As String
<JsonProperty("sunset")>
Public Property Sunset As String
<JsonProperty("dayOrNight")>
Public Property DayOrNight As String
<JsonProperty("utcTime")>
Public Property UtcTime As DateTime
End Class
Public Class ForecastLocation
<JsonProperty("forecast")>
Public Property Forecast As Forecast()
<JsonProperty("continent")>
Public Property Continent As String
<JsonProperty("country")>
Public Property Country As String
<JsonProperty("location")>
Public Property Location As String
<JsonProperty("latitude")>
Public Property Latitude As Double
<JsonProperty("longitude")>
Public Property Longitude As Double
<JsonProperty("timezone")>
Public Property Timezone As Integer
End Class
Public Class MetcheckData
<JsonProperty("forecastLocation")>
Public Property ForecastLocation As ForecastLocation
End Class
Public Class Metdata
<JsonProperty("metcheckData")>
Public Property MetcheckData As MetcheckData
<JsonProperty("feedCreation")>
Public Property FeedCreation As DateTime
<JsonProperty("feedCreator")>
Public Property FeedCreator As String
<JsonProperty("feedModel")>
Public Property FeedModel As String
<JsonProperty("feedModelRun")>
Public Property FeedModelRun As String
<JsonProperty("feedModelRunInitialTime")>
Public Property FeedModelRunInitialTime As DateTime
<JsonProperty("feedResolution")>
Public Property FeedResolution As String
End Class
dict.Metcheckdata.Forecastlocation.Forecast будет содержать ваши 155записи.