Class StringFromNumberConverter
- Namespace
- Crews.PlanningCenter.Api.Converters
- Assembly
- Crews.PlanningCenter.Api.dll
Converts a JSON number or string token to a string.
public class StringFromNumberConverter : JsonConverter<string>
- Inheritance
-
StringFromNumberConverter
- Inherited Members
Constructors
StringFromNumberConverter()
public StringFromNumberConverter()
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads a JSON number or string token and returns its value as a string. Integer values are preserved without a decimal point; floating-point values use double formatting.
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReadertypeToConvertTypeoptionsJsonSerializerOptions
Returns
Write(Utf8JsonWriter, string, JsonSerializerOptions)
Writes value as a JSON string token.
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWritervaluestringoptionsJsonSerializerOptions