JsonSerializerOptions.PreferredObjectCreationHandling Propiedad

Definición

Obtiene o establece el control de creación de objetos preferido para las propiedades al deserializar JSON.

public:
 property System::Text::Json::Serialization::JsonObjectCreationHandling PreferredObjectCreationHandling { System::Text::Json::Serialization::JsonObjectCreationHandling get(); void set(System::Text::Json::Serialization::JsonObjectCreationHandling value); };
public System.Text.Json.Serialization.JsonObjectCreationHandling PreferredObjectCreationHandling { get; set; }
member this.PreferredObjectCreationHandling : System.Text.Json.Serialization.JsonObjectCreationHandling with get, set
Public Property PreferredObjectCreationHandling As JsonObjectCreationHandling

Valor de propiedad

Cuando se establece en Populate, se rellenarán todas las propiedades que sean capaces de reutilizar la instancia existente.

Comentarios

Solo se tiene en cuenta el tipo de propiedad. Por ejemplo, si una propiedad es de tipo IEnumerable<T> pero se le asigna List<T>, no se rellenará porque IEnumerable<T> no es capaz de rellenarse. Además, los tipos de valor requieren que se rellene un establecedor.

Se aplica a