<PackageReference Include="System.Text.Json" Version="7.0.0-preview.6.22324.4" />

JsonConverter<T>

public abstract class JsonConverter<T> : JsonConverter
Converts an object or value to or from JSON.
public virtual bool HandleNull { get; }

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

public abstract T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Reads and converts the JSON to type T.

public virtual T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Reads a dictionary key from a JSON property name.

public abstract void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)

Writes a specified value as JSON.

public virtual void WriteAsPropertyName(Utf8JsonWriter writer, T value, JsonSerializerOptions options)

Writes a dictionary key as a JSON property name.