Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-564

Serialization fails if property declared as an interface has a value of null

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.1
    • Affects Version/s: 1.6
    • Component/s: None
    • None

      To reproduce use these classes:

          interface IWhatever { }
          class Whatever : IWhatever { }
      
          class Person
          {
              public IWhatever Whatever { get; set; }
          }
      

      and this code:

                      var p = new Person();
                      var json = p.ToJson();
      

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: