Bewerken

Delen via


JsonTypeInfo.PreferredPropertyObjectCreationHandling Property

Definition

Gets or sets the preferred JsonObjectCreationHandling value for properties contained in the type.

public:
 property Nullable<System::Text::Json::Serialization::JsonObjectCreationHandling> PreferredPropertyObjectCreationHandling { Nullable<System::Text::Json::Serialization::JsonObjectCreationHandling> get(); void set(Nullable<System::Text::Json::Serialization::JsonObjectCreationHandling> value); };
public System.Text.Json.Serialization.JsonObjectCreationHandling? PreferredPropertyObjectCreationHandling { get; set; }
member this.PreferredPropertyObjectCreationHandling : Nullable<System.Text.Json.Serialization.JsonObjectCreationHandling> with get, set
Public Property PreferredPropertyObjectCreationHandling As Nullable(Of JsonObjectCreationHandling)

Property Value

Exceptions

The JsonTypeInfo instance has been locked for further modification.

-or-

Unmapped member handling is only supported for JsonTypeInfoKind.Object.

Remarks

For contracts originating from DefaultJsonTypeInfoResolver or JsonSerializerContext, the value of this callback will be mapped from JsonObjectCreationHandlingAttribute annotations on types.

Applies to