asp web api json 序列化后 把私有字段信息也返回了解决办法
serialization returns private properties
Are your types marked as [Serializable]? Serializable means that the serializer should serialize all fields - private or public.
Try to remove Serializable or else use this line to stop the JSON formatter from recognizing the attribute:
config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new DefaultContractResolver();
浙公网安备 33010602011771号