-Added IgnoreAll to DefaultValueHandling which ignores all default class/struct/privative values

-Added support for DataMemberAttribute's EmitDefaultValue
-Fixed losing decimal precision when writing JValues
-Fixed error when calling ToList on empty JObjects and JArrays
This commit is contained in:
James Newton-King
2012-09-01 13:34:07 +12:00
parent 028c287cff
commit d9c8d78d77
20 changed files with 312 additions and 39 deletions
+2 -2
View File
@@ -84,10 +84,10 @@
<content>
<para><codeEntityReference>T:Newtonsoft.Json.DefaultValueHandling</codeEntityReference>
is an option on the JsonSerializer and controls how the serializer handles
properties with a default value. Setting a value of DefaultValueHandling.Ignore
properties with a default value. Setting a value of DefaultValueHandling.IgnoreAll
will make the JsonSerializer skip writing any properties that have a default
value to the JSON result. For object references this will be null. For value
types like int and DateTime the serializer will skip the default unitialized
types like int and DateTime the serializer will skip the default uninitialized
value for that value type.</para>
<para>Json.NET also allows you to customize what the default value of an individual