Table of Contents

Class IsoDateTimeConverter

Namespace
Newtonsoft.Json.Converters
Assembly
Newtonsoft.Json.dll

Converts a DateTime to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z).

public class IsoDateTimeConverter : DateTimeConverterBase
Inheritance
IsoDateTimeConverter
Inherited Members

Constructors

IsoDateTimeConverter()

public IsoDateTimeConverter()

Properties

Culture

Gets or sets the culture used when converting a date to and from JSON.

public CultureInfo Culture { get; set; }

Property Value

CultureInfo

The culture used when converting a date to and from JSON.

DateTimeFormat

Gets or sets the date time format used when converting a date to and from JSON.

public string DateTimeFormat { get; set; }

Property Value

string

The date time format used when converting a date to and from JSON.

DateTimeStyles

Gets or sets the date time styles used when converting a date to and from JSON.

public DateTimeStyles DateTimeStyles { get; set; }

Property Value

DateTimeStyles

The date time styles used when converting a date to and from JSON.

Methods

ReadJson(JsonReader, Type, object, JsonSerializer)

Reads the JSON representation of the object.

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

Parameters

reader JsonReader

The 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 object value.

WriteJson(JsonWriter, object, JsonSerializer)

Writes the JSON representation of the object.

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

Parameters

writer JsonWriter

The JsonWriter to write to.

value object

The value.

serializer JsonSerializer

The calling serializer.