DefaultContractresolver .net tidak termasuk nilai null jsonserializersettings contractresolver defaultContractracolver
public class DataContractResolver : DefaultContractResolver
{
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
{
var property = base.CreateProperty(member, memberSerialization);
property.NullValueHandling = NullValueHandling.Include;
property.DefaultValueHandling = DefaultValueHandling.Include;
property.ShouldSerialize = o => true;
return property;
}
}
DreamCoder