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
JsonReaderThe JsonReader to read from.
objectType
TypeType of the object.
existingValue
objectThe existing value of object being read.
serializer
JsonSerializerThe 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
JsonWriterThe JsonWriter to write to.
value
objectThe value.
serializer
JsonSerializerThe calling serializer.