JsonTypeInfo.PreferredPropertyObjectCreationHandling Propriété

Définition

Obtient ou définit la valeur préférée JsonObjectCreationHandling pour les propriétés contenues dans le 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)

Valeur de propriété

Exceptions

L’instance JsonTypeInfo a été verrouillée pour une modification supplémentaire.

- ou -

La gestion des membres non mappée n’est prise en charge que pour JsonTypeInfoKind.Object.

Spécifie une valeur non valide JsonObjectCreationHandling .

Remarques

Pour les contrats provenant DefaultJsonTypeInfoResolver ou JsonSerializerContext, la valeur de ce rappel est mappée à partir d’annotations JsonObjectCreationHandlingAttribute sur les types.

S’applique à