Class TcknJsonConverter
- Namespace
- HeroKit.Globalization.Turkey
- Assembly
- HeroKit.dll
Reads and writes a Tckn as a JSON string. An invalid number fails deserialization; default(Tckn) is written as null.
public sealed class TcknJsonConverter : JsonConverter<Tckn>
- Inheritance
-
TcknJsonConverter
- Inherited Members
- Extension Methods
Remarks
Tckn uses this converter through JsonConverterAttribute. It is public so that the System.Text.Json source generator, which Native AOT applications use, can create it.
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type Tckn.
public override Tckn Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
Returns
- Tckn
The converted value.
Write(Utf8JsonWriter, Tckn, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, Tckn value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriterThe writer to write to.
valueTcknThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.