Compartir a través de


JsonMetadataServices.CreateObjectInfo<T> Método

Definición

Crea metadatos para una clase o estructura complejas.

public:
generic <typename T>
 static System::Text::Json::Serialization::Metadata::JsonTypeInfo<T> ^ CreateObjectInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonObjectInfoValues<T> ^ objectInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> CreateObjectInfo<T> (System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<T> objectInfo);
static member CreateObjectInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<'T> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T>
Public Shared Function CreateObjectInfo(Of T) (options As JsonSerializerOptions, objectInfo As JsonObjectInfoValues(Of T)) As JsonTypeInfo(Of T)

Parámetros de tipo

T

Tipo de la clase o estructura.

Parámetros

options
JsonSerializerOptions

que JsonSerializerOptions se va a usar para la serialización y deserialización.

objectInfo
JsonObjectInfoValues<T>

Proporciona metadatos de serialización sobre un tipo de objeto con constructores, propiedades y campos.

Devoluciones

JsonTypeInfo<T>

Instancia JsonTypeInfo<T> de que representa la clase o estructura.

Excepciones

options o objectInfo es null.

Comentarios

Esta API la usa la salida del generador de origen System.Text.Json y no debe llamarse directamente.

Se aplica a