<PackageReference Include="System.Text.Json" Version="8.0.0-rc.1.23419.4" />

JsonPolymorphismOptions

Defines polymorphic configuration for a specified base type.

Gets the list of derived types supported in the current polymorphic type configuration.

public bool IgnoreUnrecognizedTypeDiscriminators { get; set; }

Gets or sets a value that indicates whether the serializer should ignore any unrecognized type discriminator IDs and revert to the contract of the base type.

public string TypeDiscriminatorPropertyName { get; set; }

Gets or sets a custom type discriminator property name for the polymorhic type. Uses the default '$type' property name if left unset.

Gets or sets the behavior when serializing an undeclared derived runtime type.

Creates an empty JsonPolymorphismOptions instance.