您当前的位置:首页 > ASP.NET > 文章详情

c#解析json:Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collec

2018-10-165283人围观
使用c#解析json的时候报:

Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List

出现这个错误的时候,可能是你对应的实体类型错误,例如这个字段可能是string类型的,结果你弄成了int类型,或者是实体类型的时候,你弄成了string类型。 我今天就碰到了这个坑,而且还花了不少的时间。。。

文章评论

热门评论
暂无评论