How to deserialize JSON in .NET Part 2 – Create the Class
1 min read

How to deserialize JSON in .NET Part 2 – Create the Class

Now it’s time to create the class that can represent the .JSON file which we can deserialize into.

public class WeatherForecast
{
    public DateTimeOffset Date { get; set; }
    public int TemperatureCelsius { get; set; }
    public string Summary { get; set; }
    public IList<DateTimeOffset> DatesAvailable { get; set; }
    public string[] SummaryWords { get; set; }
}

Great! Now in the next and final post we’ll deserialize the .json file.

Leave a Reply