-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.3
-
Component/s: None
-
None
-
Minor Change
Given the following classes:
public class C
{ public int _id; public N n; }public class N
{ public int x; }the following code results in an InvalidOperationException:
var json = "
{ '_id' : 1, n : 'should be a document, not a string' }";
BsonSerializer.Deserialize<C>(json);
The error message should be more specific, identifying which property of which class couldn't be deserialized.