@@ -61,7 +61,7 @@ public void ShouldIncludeNullObjects() {
61
61
var data = new DefaultsModel ( ) ;
62
62
IJsonSerializer serializer = GetSerializer ( ) ;
63
63
string json = serializer . Serialize ( data ) ;
64
- Assert . Equal ( @"{""number"":0,""bool"":false,""message"":null,""collection"":null}" , json ) ;
64
+ Assert . Equal ( @"{""number"":0,""bool"":false,""message"":null,""collection"":null,""dictionary"":null }" , json ) ;
65
65
}
66
66
67
67
[ Fact ]
@@ -119,7 +119,8 @@ public void CanSetMaxDepth() {
119
119
public void WillIgnoreEmptyCollections ( ) {
120
120
var data = new DefaultsModel {
121
121
Message = "Testing" ,
122
- Collection = new Collection < string > ( )
122
+ Collection = new Collection < string > ( ) ,
123
+ Dictionary = new Dictionary < string , string > ( )
123
124
} ;
124
125
IJsonSerializer serializer = GetSerializer ( ) ;
125
126
string json = serializer . Serialize ( data , new [ ] { nameof ( DefaultsModel . Bool ) , nameof ( DefaultsModel . Number ) } ) ;
@@ -216,6 +217,7 @@ public class DefaultsModel {
216
217
public bool Bool { get ; set ; }
217
218
public string Message { get ; set ; }
218
219
public ICollection < string > Collection { get ; set ; }
220
+ public IDictionary < string , string > Dictionary { get ; set ; }
219
221
}
220
222
221
223
public class User {
0 commit comments