Redigeeri

Jagamisviis:


JsonConverter<T> Class

Definition

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

Type Parameters

T

The type of object or value handled by the converter.

Inheritance
JsonConverter<T>
Derived

Remarks

For more information, see How to write custom converters for JSON serialization.

Constructors

JsonConverter<T>()

Initializes a new JsonConverter<T> instance.

Properties

HandleNull

Gets a value that indicates whether null should be passed to the converter on serialization, and whether Null should be passed on deserialization.

Type

Gets the type being converted by the current converter instance.

Type

Gets the type being converted by the current converter instance.

(Inherited from JsonConverter)

Methods

CanConvert(Type)

Determines whether the specified type can be converted.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Read(Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type T.

ReadAsPropertyName(Utf8JsonReader, Type, JsonSerializerOptions)

Reads a dictionary key from a JSON property name.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
Write(Utf8JsonWriter, T, JsonSerializerOptions)

Writes a specified value as JSON.

WriteAsPropertyName(Utf8JsonWriter, T, JsonSerializerOptions)

Writes a dictionary key as a JSON property name.

Applies to