Muokkaa

Jaa


JsonTypeInfo.PolymorphismOptions Property

Definition

Gets or sets a configuration object specifying polymorphism metadata.

public:
 property System::Text::Json::Serialization::Metadata::JsonPolymorphismOptions ^ PolymorphismOptions { System::Text::Json::Serialization::Metadata::JsonPolymorphismOptions ^ get(); void set(System::Text::Json::Serialization::Metadata::JsonPolymorphismOptions ^ value); };
public System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions? PolymorphismOptions { get; set; }
member this.PolymorphismOptions : System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions with get, set
Public Property PolymorphismOptions As JsonPolymorphismOptions

Property Value

Exceptions

value has been associated with a different JsonTypeInfo instance.

The JsonTypeInfo instance has been locked for further modification.

-or-

Polymorphic serialization is not supported for the current metadata Kind.

Remarks

For contracts originating from DefaultJsonTypeInfoResolver or JsonSerializerContext, the configuration of this setting will be mapped from any JsonDerivedTypeAttribute or JsonPolymorphicAttribute annotations.

Applies to