-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.9
-
Component/s: None
-
None
This occurs on today's git build (8d1d29365ebefea40d2c).
The problem only happens if the Guid is the first property of the nested type. If you swap the order of the guid and int for the Child class, it will work.
public class Parent
{
public Child Child
}
public class Child
{
public Guid Id { get; set; }
public int A
{ get; set; }}
[Test]
public void Test()
{
var p = new Parent
;
p.Child.A = 1;
var json = p.ToJson();
BsonSerializer.Deserialize<Parent>(json); // throws Unexpected element exception
}