How Do I Get a JSON Object Instead of an XML Object from Your Weather API?

Tagged:

Currently contains 4 posts

Avatar

January 04, 2019 20:58

ID Coder

Hi, I’m a web developer working on a weather app. When I use my provided APP ID and API key, I get an XML object. I would like, instead, to get a JSON object. How is this possible? Thanks in advance for your help! Please send any emails to gebremesquitta@gmail.com.

Avatar

January 18, 2019 17:17

Daryl Dyck

Did you figure this out?

Avatar

June 01, 2019 09:18

Varun Kumar

How to get please answer

Avatar

June 05, 2019 08:53

Dennis Maidon

This is the Vb.Net code I use to get a JSON object:

Dim url = $“http://api.weatherunlocked.com/api/forecast/us.{Zipcode}?app_id={AppId}&app_key={AppKey}”
Dim client = New HttpClient()
With client.DefaultRequestHeaders
.UserAgent.ParseAdd(USE_AGENT)
.AcceptEncoding.Add(New StringWithQualityHeaderValue(“gzip”))
.Accept.Add(New MediaTypeWithQualityHeaderValue(“application/json”))
End With
client.DefaultRequestHeaders.UserAgent.ParseAdd(USE_AGENT)
Dim rb = Await client.GetStringAsync(New Uri(url))

Reply to thread
  1. If you're human, leave this field empty.