JsonSerializerOptions.PreferredObjectCreationHandling 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 object creation handling for properties when deserializing 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
Property Value
When set to Populate, all properties that are capable of reusing the existing instance will be populated.
Remarks
Only property type is taken into consideration. For example, if a property is of type IEnumerable<T> but it is assigned List<T>, it won't be populated because IEnumerable<T> is not capable of populating. Additionally, value types require a setter to be populated.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za