您可以提供设置来
JsonConvert.DeserializeObject告诉它如何处理空值(在这种情况下,还有更多):
var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore };var jsonModel = JsonConvert.DeserializeObject<Customer>(jsonString, settings);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)