Retrieving Hourly10Day json using c# MVC

  • 1
  • Question
  • Updated 5 years ago

I started by retrieving an xml file using the following:

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 5 years ago

  • 1

Be the first to post a reply!