C# Json序列化去掉k__BackingField问题的解决方案
方案一:
如果是WebAPI,可以加入全局设置:
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new DefaultContractResolver() { IgnoreSerializableAttribute = true };
方案二:
Remove
[Serializable]
from your class 或者Add [DataContract] 、
[DataMember]
to your class