方案一:

如果是WebAPI,可以加入全局设置:

GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new DefaultContractResolver() { IgnoreSerializableAttribute = true };

方案二:

Remove [Serializable] from your class 或者

Add [DataContract] 、[DataMember] to your class 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2023-03-08
  • 2022-12-23
  • 2022-03-09
猜你喜欢
  • 2021-10-23
  • 2021-10-10
  • 2022-12-23
  • 2023-03-20
相关资源
相似解决方案