Skip to content

PgNumericConverter

Namespace: Ankus.Serialization

Assembly: Ankus.Runtime.dll

Writes numeric strings losslessly and reads strings or exact JSON number tokens on the active backend.

public sealed class PgNumericConverter : JsonConverter<PgNumeric>

Inheritance: object, JsonConverter, JsonConverter<PgNumeric>

public PgNumericConverter()

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Section titled “Read(ref Utf8JsonReader, Type, JsonSerializerOptions)”
public override PgNumeric Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters:

reader — Utf8JsonReader

typeToConvert — Type

options — JsonSerializerOptions

Returns: PgNumeric

Write(Utf8JsonWriter, PgNumeric, JsonSerializerOptions)

Section titled “Write(Utf8JsonWriter, PgNumeric, JsonSerializerOptions)”
public override void Write(Utf8JsonWriter writer, PgNumeric value, JsonSerializerOptions options)

Parameters:

writer — Utf8JsonWriter

value — PgNumeric

options — JsonSerializerOptions