In JsonMediaTypeFormatter, JsonContractResolver is set as DefaultContractResolver, Which calls ConfigureProperty Method, Which should set Default SerializerSettings from JsonMediaTypeFormatter,
because of which DefaultValueHandling, NullValueHandling, don't work at all.
private void ConfigureProperty(MemberInfo member, JsonProperty property)
{
if ((this._formatter.RequiredMemberSelector != null) && this._formatter.RequiredMemberSelector.IsRequiredMember(member))
{
property.Required = Required.AllowNull;
property.DefaultValueHandling = 0;
property.NullValueHandling = 0;
}
else
{
property.Required = Required.Default;
}
}
Comments: Hi, We are still unable to reproduce this issue per your description. If you are able to come up with a repro for this please attach it to the bug and reactivate. Thanks, Eilon
because of which DefaultValueHandling, NullValueHandling, don't work at all.
private void ConfigureProperty(MemberInfo member, JsonProperty property)
{
if ((this._formatter.RequiredMemberSelector != null) && this._formatter.RequiredMemberSelector.IsRequiredMember(member))
{
property.Required = Required.AllowNull;
property.DefaultValueHandling = 0;
property.NullValueHandling = 0;
}
else
{
property.Required = Required.Default;
}
}
Comments: Hi, We are still unable to reproduce this issue per your description. If you are able to come up with a repro for this please attach it to the bug and reactivate. Thanks, Eilon