<PackageReference Include="System.Text.Json" Version="9.0.0-preview.3.24172.9" />

JsonUnknownDerivedTypeHandling

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

An object of undeclared runtime type will fail polymorphic serialization.

An object of undeclared runtime type will fall back to the serialization contract of the base type.

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.