且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法将当前JSON对象反序列化为System.Collections.Generic.List类型

更新时间:2022-02-09 08:15:51

我通过json将json运回c#转换器。 我不打算包含所有生成的类,但是根对象返回一个DailyForecast列表。   您只需要进入根对象而不是根对象列表

I ran the json back through a json to c# converter.  I am not going to include all the classes generated but the root object returns an List of DailyForecast.   You only need to into a root object not a List of root objects

var result = JsonConvert.DeserializeObject<AccuWeather5DaysForecast.RootObject>(json_5days_forecast);