JsonPropertyInfo.ObjectCreationHandling Property

Definition

Gets or sets a value indicating if the property or field should be replaced or populated during deserialization.

C#
public System.Text.Json.Serialization.JsonObjectCreationHandling? ObjectCreationHandling { get; set; }

Property Value

Remarks

The initial value for this property is based on the presence of the JsonObjectCreationHandlingAttribute attribute on the property. When null, effective handling is resolved based on the capability of the property converter to populate, and the containing type's PreferredPropertyObjectCreationHandling and PreferredObjectCreationHandling values.

Applies to

Product Versions
.NET 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)