JsonConverter<T> Clase

Definición

Convierte un objeto o un valor en JSON o desde JSON.Converts an object or value to or from JSON.

generic <typename T>
public ref class JsonConverter abstract : System::Text::Json::Serialization::JsonConverter
public abstract class JsonConverter<T> : System.Text.Json.Serialization.JsonConverter
type JsonConverter<'T> = class
    inherit JsonConverter
Public MustInherit Class JsonConverter(Of T)
Inherits JsonConverter

Parámetros de tipo

T

Tipo de objeto o valor controlado por el convertidor.The type of object or value handled by the converter.

Herencia
JsonConverter<T>

Comentarios

Para obtener más información, vea Cómo escribir convertidores personalizados para la serialización de JSON.For more information, see How to write custom converters for JSON serialization.

Constructores

JsonConverter<T>()

Inicializa una nueva instancia de JsonConverter<T>.Initializes a new JsonConverter<T> instance.

Propiedades

HandleNull

Indica si null se debe pasar al convertidor en la serialización y si Null debe pasarse en la deserialización.Indicates whether null should be passed to the converter on serialization, and whether Null should be passed on deserialization.

Métodos

CanConvert(Type)

Determina si el tipo especificado se puede convertir.Determines whether the specified type can be converted.

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.Determines whether the specified object is equal to the current object.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Heredado de Object)
MemberwiseClone()

Crea una copia superficial del Object actual.Creates a shallow copy of the current Object.

(Heredado de Object)
Read(Utf8JsonReader, Type, JsonSerializerOptions)

Lee y convierte el JSON en el tipo T.Reads and converts the JSON to type T.

ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Heredado de Object)
Write(Utf8JsonWriter, T, JsonSerializerOptions)

Escribe un valor especificado como JSON.Writes a specified value as JSON.

Se aplica a