JavaScriptDateTimeConverter Class

Namespace: Stimulsoft.Base.Json.Converters

Converts a DateTime to and from a JavaScript date constructor (e.g. new Date(52231943)).

Inheritance

Inherits from: DateTimeConverterBase

Methods

Method Returns Description
ReadJson object Reads the JSON representation of the object.
WriteJson void Writes the JSON representation of the object.

Method Details

ReadJson

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

Reads the JSON representation of the object.

Parameters

  • reader (JsonReader) — The JsonReader to read from.
  • objectType (Type) — Type of the object.
  • existingValue (object) — The existing property value of the JSON that is being converted.
  • serializer (JsonSerializer) — The calling serializer.

Returns object — The object value.


WriteJson

WriteJson(writer: JsonWriter, value: object, serializer: JsonSerializer): void

Writes the JSON representation of the object.

Parameters

  • writer (JsonWriter) — The JsonWriter to write to.
  • value (object) — The value.
  • serializer (JsonSerializer) — The calling serializer.