Share via


JsonSerializerOptions.GetTypeInfo(Type) 메서드

정의

JsonTypeInfo 현재 JsonSerializerOptions instance 확인된 계약 메타데이터를 가져옵니다.

public:
 System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ GetTypeInfo(Type ^ type);
public System.Text.Json.Serialization.Metadata.JsonTypeInfo GetTypeInfo (Type type);
member this.GetTypeInfo : Type -> System.Text.Json.Serialization.Metadata.JsonTypeInfo
Public Function GetTypeInfo (type As Type) As JsonTypeInfo

매개 변수

type
Type

계약 메타데이터를 resolve 형식입니다.

반환

에 대해 확인된 계약 메타데이터입니다 type.

예외

typenull입니다.

type 가 serialization에 유효하지 않습니다.

설명

반환된 메타데이터는 다운캐스트될 JsonTypeInfo<T> 수 있으며 관련 JsonSerializer 오버로드와 함께 사용할 수 있습니다.

수정을 JsonSerializerOptions 위해 instance 잠긴 경우 메서드는 메타데이터에 대해 캐시된 instance 반환합니다.

적용 대상