Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

enum System.​Text.​Json.​Serialization.​JsonUnknownDerivedTypeHandling

Assembly: System.Text.Json

Defines how objects of a derived runtime type that has not been explicitly declared for polymorphic serialization should be handled.

Values

FailSerialization
An object of undeclared runtime type will fail polymorphic serialization.
FallBackToBaseType
An object of undeclared runtime type will fall back to the serialization contract of the base type.
FallBackToNearestAncestor
An object of undeclared runtime type will revert to the serialization contract of the nearest declared ancestor type. Certain interface hierarchies are not supported due to diamond ambiguity constraints.