JsonDateTimeMcsConverter

Ecng.Serialization

Provides a JSON converter for converting DateTime values from Unix timestamps in microseconds.

Hereda de: JsonDateTimeConverter

Constructores

JsonDateTimeMcsConverter
public JsonDateTimeMcsConverter()
jsonDateTimeMcsConverter = JsonDateTimeMcsConverter()

Initializes a new instance of the JsonDateTimeMcsConverter class using microseconds.

Métodos

Convert
protected override DateTime Convert(double value)
result = jsonDateTimeMcsConverter.Convert(value)

Converts the specified double value to a DateTime using microsecond precision.

value
The double value representing the Unix timestamp in microseconds.

Devuelve: A DateTime corresponding to the Unix timestamp.

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

Writes the JSON representation of the object in microseconds.