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

Add conventions and attributes to configure ObjectSerializer AllowedTypes

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.2.0
    • Affects Version/s: None
    • Component/s: Serialization
    • None
    • Fully Compatible
    • Needed
    • Hide

      Added `ObjectSerializerAllowedTypesConvention`, a new convention that allows to set the types that are allowed to be serialized and deserialized by the object serializer.
      This convention can be customized by using one of the constructors, or using one of the predefined static properties, ike `ObjectSerializerAllowedTypesConvention.AllowAllTypes`

      Show
      Added `ObjectSerializerAllowedTypesConvention`, a new convention that allows to set the types that are allowed to be serialized and deserialized by the object serializer. This convention can be customized by using one of the constructors, or using one of the predefined static properties, ike `ObjectSerializerAllowedTypesConvention.AllowAllTypes`

      ObjectSerializer was recently changed to have an AllowedTypes filter that defaults to a set of framework types that are deemed to be safe.

      While an application can reconfigure the AllowedTypes by registering a suitably configured ObjectSerializer, in many cases it could be more convenient to register a convention or use attributes to annotate the POCO.

      Details to be determined.

            Assignee:
            ferdinando.papale@mongodb.com Ferdinando Papale
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: