JsonTypeInfo.PolymorphismOptions Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om