JsonTypeInfo.PreferredPropertyObjectCreationHandling 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 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.
Specified an invalid JsonObjectCreationHandling value.
Remarks
For contracts originating from DefaultJsonTypeInfoResolver or JsonSerializerContext, the value of this callback will be mapped from JsonObjectCreationHandlingAttribute annotations on types.