-Fixed DefaultValueHandling including a property when the default value is the same value but a different type

This commit is contained in:
JamesNK
2011-04-10 02:53:43 +00:00
parent 1ab8f8b686
commit 48f3242095
5 changed files with 62 additions and 2 deletions
@@ -569,7 +569,7 @@ namespace Newtonsoft.Json.Serialization
if (property.NullValueHandling.GetValueOrDefault(Serializer.NullValueHandling) == NullValueHandling.Ignore && value == null)
return false;
if (property.DefaultValueHandling.GetValueOrDefault(Serializer.DefaultValueHandling) == DefaultValueHandling.Ignore && Equals(value, property.DefaultValue))
if (property.DefaultValueHandling.GetValueOrDefault(Serializer.DefaultValueHandling) == DefaultValueHandling.Ignore && MiscellaneousUtils.ValueEquals(value, property.DefaultValue))
return false;
if (!property.Writable)