EpochSecondsConverter class

A JsonConverter for encoding and decoding DateTime objects as epoch seconds (UTC).

This converter is used to serialize and deserialize timestamps in DIDComm messages.

Constructors

EpochSecondsConverter()
Creates an EpochSecondsConverter.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fromJson(int json) DateTime
Decodes a DateTime from an integer representing seconds since the Unix epoch (UTC).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson(DateTime object) int
Encodes a DateTime as an integer representing seconds since the Unix epoch (UTC).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited