I'm trying to parse something like the following JSON to extract specific values - such as description, name, temp etc. I've tried the examples & reworking them, but just cannot get it.
Obtain real-time weather data for any location globally with OpenWeather's Current Weather Data API. Provides comprehensive weather details in JSON, XML, or HTML formats, including temperature, pressure, humidity, and more. Supports geocoding, language options, and different measurement units.
Dim parser As JSONParser
parser.Initialize(<text>)
Dim root As Map = parser.NextObject
Dim dt As Int = root.Get("dt")
Dim coord As Map = root.Get("coord")
Dim lon As Double = coord.Get("lon")
Dim lat As Double = coord.Get("lat")
Dim visibility As Int = root.Get("visibility")
Dim weather As List = root.Get("weather")
For Each colweather As Map In weather
Dim icon As String = colweather.Get("icon")
Dim description As String = colweather.Get("description")
Dim main As String = colweather.Get("main")
Dim id As Int = colweather.Get("id")
Next
Dim name As String = root.Get("name")
Dim cod As Int = root.Get("cod")
Dim main As Map = root.Get("main")
Dim temp As Double = main.Get("temp")
Dim temp_min As Double = main.Get("temp_min")
Dim humidity As Int = main.Get("humidity")
Dim pressure As Int = main.Get("pressure")
Dim temp_max As Double = main.Get("temp_max")
Dim clouds As Map = root.Get("clouds")
Dim all As Int = clouds.Get("all")
Dim id As Int = root.Get("id")
Dim sys As Map = root.Get("sys")
Dim country As String = sys.Get("country")
Dim sunrise As Int = sys.Get("sunrise")
Dim sunset As Int = sys.Get("sunset")
Dim id As Int = sys.Get("id")
Dim type As Int = sys.Get("type")
Dim message As Double = sys.Get("message")
Dim base As String = root.Get("base")
Dim wind As Map = root.Get("wind")
Dim deg As Int = wind.Get("deg")
Dim speed As Double = wind.Get("speed")
Dim parser As JSONParser
parser.Initialize(<text>)
Dim root As Map = parser.NextObject
Dim dt As Int = root.Get("dt")
Dim coord As Map = root.Get("coord")
Dim lon As Double = coord.Get("lon")
Dim lat As Double = coord.Get("lat")
Dim visibility As Int = root.Get("visibility")
Dim weather As List = root.Get("weather")
For Each colweather As Map In weather
Dim icon As String = colweather.Get("icon")
Dim description As String = colweather.Get("description")
Dim main As String = colweather.Get("main")
Dim id As Int = colweather.Get("id")
Next
Dim name As String = root.Get("name")
Dim cod As Int = root.Get("cod")
Dim main As Map = root.Get("main")
Dim temp As Double = main.Get("temp")
Dim temp_min As Double = main.Get("temp_min")
Dim humidity As Int = main.Get("humidity")
Dim pressure As Int = main.Get("pressure")
Dim temp_max As Double = main.Get("temp_max")
Dim clouds As Map = root.Get("clouds")
Dim all As Int = clouds.Get("all")
Dim id As Int = root.Get("id")
Dim sys As Map = root.Get("sys")
Dim country As String = sys.Get("country")
Dim sunrise As Int = sys.Get("sunrise")
Dim sunset As Int = sys.Get("sunset")
Dim id As Int = sys.Get("id")
Dim type As Int = sys.Get("type")
Dim message As Double = sys.Get("message")
Dim base As String = root.Get("base")
Dim wind As Map = root.Get("wind")
Dim deg As Int = wind.Get("deg")
Dim speed As Double = wind.Get("speed")