Class DurationConverter
JSON converter for the Duration type, converting between the CQL duration string representation and JSON string values.
public class DurationConverter : JsonConverter<Duration>
- Inheritance
-
DurationConverter
- Inherited Members
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts a JSON string to a Duration value.
public override Duration Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReadertypeToConvertTypeoptionsJsonSerializerOptions
Returns
Write(Utf8JsonWriter, Duration, JsonSerializerOptions)
Writes a Duration value as a JSON string.
public override void Write(Utf8JsonWriter writer, Duration value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWritervalueDurationoptionsJsonSerializerOptions