Retrieving Hourly10Day json using c# MVC

  • 1
  • Question
  • Updated 4 years ago

I started by retrieving an xml file using the following:

http://api.wunderground.com/api/37cdd4a2b2b9134e/hourly10day/q/53545.xml

I then created an .xsd file using the Windows XSD utility.   Afterwards, I created the object models by using the Windows XSD utility with the /c switch.   This gives me the response class and all the child sub-children.

Now, when I retrieve the json and try to deserialize it using:

var rootObject = deserializer.Deserialize<response>(jsn);

I get the following error:  No parameterless constructor defined for type of 'responseHourly_forecastForecast[]'.

Can anyone offer some guidance?


Photo of David Kimball

David Kimball

  • 1 Post
  • 0 Reply Likes

Posted 4 years ago

  • 1

Be the first to post a reply!