JsonDateTimeNanoConverter
Ecng.Serialization
Provides a JSON converter for converting DateTime values from Unix timestamps in nanoseconds.
Наследует: JsonDateTimeConverter
Конструкторы
JsonDateTimeNanoConverter
public JsonDateTimeNanoConverter()
jsonDateTimeNanoConverter = JsonDateTimeNanoConverter()
Initializes a new instance of the JsonDateTimeNanoConverter class using nanoseconds.
Методы
Convert
protected override DateTime Convert(double value)
result = jsonDateTimeNanoConverter.Convert(value)
Converts the specified double value to a DateTime using nanosecond precision.
- value
- The double value representing the Unix timestamp in nanoseconds.
Возвращает: A DateTime corresponding to the Unix timestamp.
WriteJson
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
jsonDateTimeNanoConverter.WriteJson(writer, value, serializer)
Writes the JSON representation of the object in nanoseconds.