Table of Contents

Class NumberToStringValueConverter

Namespace: CmlLib.Core.Internals
Assembly: CmlLib.Core.dll

public sealed class NumberToStringValueConverter : JsonConverter<string?>

Inheritance

object ← JsonConverter ← JsonConverter<string?> ← NumberToStringValueConverter

Inherited Members

JsonConverter<string?>.CanConvert(Type), JsonConverter<string?>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions), JsonConverter<string?>.Write(Utf8JsonWriter, string?, JsonSerializerOptions), JsonConverter<string?>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions), JsonConverter<string?>.WriteAsPropertyName(Utf8JsonWriter, string?, JsonSerializerOptions), JsonConverter<string?>.HandleNull, JsonConverter<string?>.Type, JsonConverter.CanConvert(Type), JsonConverter.Type, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type System.String.

public override string? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An object that specifies serialization options to use.

Returns

string?

The converted value.

Write(Utf8JsonWriter, string?, JsonSerializerOptions)

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, string? value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

value string?

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.