JsonDateTimeNanoConverter
Ecng.Serialization
Provides a JSON converter for converting DateTime values from Unix timestamps in nanoseconds.
コンストラクター
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.