语言

JsonPropertyInfo.ObjectCreationHandling 属性

定义

获取或设置一个值,该值指示是否应在反序列化期间替换或填充属性或字段。

public:
 property Nullable<System::Text::Json::Serialization::JsonObjectCreationHandling> ObjectCreationHandling { Nullable<System::Text::Json::Serialization::JsonObjectCreationHandling> get(); void set(Nullable<System::Text::Json::Serialization::JsonObjectCreationHandling> value); };
public System.Text.Json.Serialization.JsonObjectCreationHandling? ObjectCreationHandling { get; set; }
member this.ObjectCreationHandling : Nullable<System.Text.Json.Serialization.JsonObjectCreationHandling> with get, set
Public Property ObjectCreationHandling As Nullable(Of JsonObjectCreationHandling)

属性值

注解

此属性的初始值基于属性上是否存在 JsonObjectCreationHandlingAttribute 该属性。 当 null,根据属性转换器填充的功能以及包含类型的 PreferredPropertyObjectCreationHandling 值 PreferredObjectCreationHandling ,解析有效处理。

适用于