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>
Constructors
Section titled “Constructors”PgNumericConverter()
Section titled “PgNumericConverter()”public PgNumericConverter()Methods
Section titled “Methods”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