Table of Contents

Class UnixDateTimeConverter

Namespace
Microsoft.Azure.Documents
Assembly
Microsoft.Azure.Documents.Client.dll

Converts a DateTime object to and from JSON. DateTime is represented as the total number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z).

public sealed class UnixDateTimeConverter : DateTimeConverterBase
Inheritance
UnixDateTimeConverter
Extension Methods

Constructors

UnixDateTimeConverter()

public UnixDateTimeConverter()

Methods

ReadJson(JsonReader, Type, object, JsonSerializer)

Reads the JSON representation of the DateTime object.

public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)

Parameters

reader JsonReader

The Newtonsoft.Json.JsonReader to read from.

objectType Type

Type of the object.

existingValue object

The existing value of object being read.

serializer JsonSerializer

The calling serializer.

Returns

object

The DateTime object value.

WriteJson(JsonWriter, object, JsonSerializer)

Writes the JSON representation of the DateTime object.

public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)

Parameters

writer JsonWriter

The Newtonsoft.Json.JsonWriter to write to.

value object

The value.

serializer JsonSerializer

The calling serializer.