DateTimeJsonConverter Class

This converter is created because default DateTimeOffset notations in JSON do not allow it to be sorted correctly. By using Ticks (a long) instead, Azure can now correctly sort the values.

Definition

Namespace: MobileTrack.Common.Services.JsonConverters.Generics
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
internal sealed class DateTimeJsonConverter : JsonConverter<DateTimeOffset>
Inheritance
Object    JsonConverter    JsonConverterDateTimeOffset    DateTimeJsonConverter

Constructors

DateTimeJsonConverterInitializes a new instance of the DateTimeJsonConverter class

Methods

ReadReads and converts the JSON to type T.
(Overrides JsonConverterTRead(Utf8JsonReader, Type, JsonSerializerOptions))
WriteWrites a specified value as JSON.
(Overrides JsonConverterTWrite(Utf8JsonWriter, T, JsonSerializerOptions))

See Also