You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am aware of ploymorphism not supported yet, but i think JsonException should be thrown instead of NRE
publicclassMyClass{publicstringValue{get;set;}publicIThingThing{get;set;}}publicinterfaceIThing{intNumber{get;set;}}publicclassMyThing:IThing{publicintNumber{get;set;}}[Fact]publicvoidAssertDoesDeserialize(){conststringjson=@"{""Value"": ""A value"",""Thing"": {""Number"": 123}}";Assert.Throws<JsonException>(()=>{JsonSerializer.Parse<List<MyClass>>(json);});/* this test works if not use any interface type, but i guess that is expected as polymorphism not supported yet MyClass myClass = JsonSerializer.Parse<MyClass>(json); Assert.NotNull(myClass); Assert.Equal("A value", myClass.Value); Assert.NotNull(myClass.Thing); Assert.Equal(123, myClass.Thing.Number); */}
The text was updated successfully, but these errors were encountered:
I am aware of ploymorphism not supported yet, but i think JsonException should be thrown instead of NRE
The text was updated successfully, but these errors were encountered: