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

ValueType properties should be deserializable from null if supported by their serializer

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Serialization
    • Labels:
      None

      Per the contributor PR description:

      Currently, if a struct/ValueType has its own converter registered it can be deserialized from null. However if the same struct/ValueType is property (or field) of a class, deserialization fails. Given that there is no test failing if I change that behaviour, I assume that it is a bug. Nevertheless, given example below, I think it makes sense to support it anyway.

      https://github.com/mongodb/mongo-csharp-driver/pull/395

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            vincent.kam@mongodb.com Vincent Kam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: