File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ public DefaultJsonSerializer() {
17
17
ReferenceLoopHandling = ReferenceLoopHandling . Ignore ,
18
18
NullValueHandling = NullValueHandling . Ignore ,
19
19
DefaultValueHandling = DefaultValueHandling . Ignore ,
20
- PreserveReferencesHandling = PreserveReferencesHandling . None
20
+ PreserveReferencesHandling = PreserveReferencesHandling . None ,
21
+ ContractResolver = new ExceptionlessContractResolver ( )
21
22
} ;
22
23
23
24
_serializerSettings . Converters . Add ( new StringEnumConverter ( ) ) ;
Original file line number Diff line number Diff line change @@ -88,6 +88,13 @@ public void CanDeserializeDataWithoutUnderscores() {
88
88
89
89
string newJson = JsonConvert . SerializeObject ( m , settings ) ;
90
90
}
91
+
92
+ [ Fact ]
93
+ public void WillDeserializeReferenceIds ( ) {
94
+ IJsonSerializer serializer = GetSerializer ( ) ;
95
+ var ev = ( Event ) serializer . Deserialize ( @"{""reference_id"": ""123"" }" , typeof ( Event ) ) ;
96
+ Assert . Equal ( "123" , ev . ReferenceId ) ;
97
+ }
91
98
}
92
99
93
100
public class Blah {
You can’t perform that action at this time.
0 commit comments