JsonTypeInfo.CreateJsonPropertyInfo(Type, String) 메서드

정의

현재 JsonTypeInfo인스턴스에 대한 빈 JsonPropertyInfo 인스턴스를 만듭니다.

public:
 System::Text::Json::Serialization::Metadata::JsonPropertyInfo ^ CreateJsonPropertyInfo(Type ^ propertyType, System::String ^ name);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
public System.Text.Json.Serialization.Metadata.JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name);
public System.Text.Json.Serialization.Metadata.JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
member this.CreateJsonPropertyInfo : Type * string -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo
member this.CreateJsonPropertyInfo : Type * string -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo
Public Function CreateJsonPropertyInfo (propertyType As Type, name As String) As JsonPropertyInfo

매개 변수

propertyType
Type

속성에 대해 선언된 형식입니다.

name
String

JSON serialization 및 deserialization에 사용되는 속성 이름입니다.

반품

JsonPropertyInfo 인스턴스입니다.

특성

예외

propertyType 또는 name .입니다 null.

propertyType 는 serialization에 사용할 수 없습니다.

JsonTypeInfo 추가 수정을 위해 인스턴스가 잠겼습니다.

적용 대상