更新时间: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);
'无法将当前JSON对象(例如{" Name":" value"})反序列化为类型'system.collections.generic.list`1 ...
无法将当前JSON对象(例如{"name":"value"})反序列化为"System.Collections.Generic.List"类型
JSON.Net-无法将当前json对象(例如{"name":"value"})反序列化为类型'system.collections.generic.list`1
无法将 JSON 数组(例如 [1,2,3])反序列化为类型“",因为类型需要 JSON 对象(例如 {“name":“value"})才能正确反序列化
无法将当前JSON数组(例如[1,2,3])反序列化为类型'TenantManagementWebApi.Entities.Tenant
无法将当前json对象反序列化,因为(例如。{name":" value"}})因为类型需要json数组(例如[1,2,3])