@@ -35,6 +35,7 @@ public static JsConfigScope With(
3535 ParseAsType ? parsePrimitiveIntegerTypes = null ,
3636 bool ? excludeDefaultValues = null ,
3737 bool ? includeNullValues = null ,
38+ bool ? includeNullValuesInDictionaries = null ,
3839 bool ? includeDefaultEnums = null ,
3940 bool ? excludeTypeInfo = null ,
4041 bool ? includeTypeInfo = null ,
@@ -70,6 +71,7 @@ public static JsConfigScope With(
7071
7172 ExcludeDefaultValues = excludeDefaultValues ?? sExcludeDefaultValues ,
7273 IncludeNullValues = includeNullValues ?? sIncludeNullValues ,
74+ IncludeNullValuesInDictionaries = includeNullValuesInDictionaries ?? sIncludeNullValuesInDictionaries ,
7375 IncludeDefaultEnums = includeDefaultEnums ?? sIncludeDefaultEnums ,
7476 ExcludeTypeInfo = excludeTypeInfo ?? sExcludeTypeInfo ,
7577 IncludeTypeInfo = includeTypeInfo ?? sIncludeTypeInfo ,
@@ -201,6 +203,21 @@ public static bool IncludeNullValues
201203 }
202204 }
203205
206+ private static bool ? sIncludeNullValuesInDictionaries ;
207+ public static bool IncludeNullValuesInDictionaries
208+ {
209+ get
210+ {
211+ return ( JsConfigScope . Current != null ? JsConfigScope . Current . IncludeNullValuesInDictionaries : null )
212+ ?? sIncludeNullValuesInDictionaries
213+ ?? false ;
214+ }
215+ set
216+ {
217+ if ( ! sIncludeNullValuesInDictionaries . HasValue ) sIncludeNullValuesInDictionaries = value ;
218+ }
219+ }
220+
204221 private static bool ? sIncludeDefaultEnums ;
205222 public static bool IncludeDefaultEnums
206223 {
@@ -708,6 +725,7 @@ public static void Reset()
708725 sConvertObjectTypesIntoStringDictionary = null ;
709726 sExcludeDefaultValues = null ;
710727 sIncludeNullValues = null ;
728+ sIncludeNullValuesInDictionaries = null ;
711729 sExcludeTypeInfo = null ;
712730 sEmitCamelCaseNames = null ;
713731 sEmitLowercaseUnderscoreNames = null ;
0 commit comments