InstantLongSerializer

object InstantLongSerializer : KSerializer<Instant> (source)

Serializes Instant as whole seconds from the Unix epoch.

In JSON this is a NumericDate encoded as a JSON number (RFC 7519, Section 2). In CBOR this is a CWT NumericDate encoded as an untagged CBOR numeric date, with CBOR tag 1 omitted (RFC 8392, Section 2; RFC 8949, Section 3.4.2).

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): Instant
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: Instant)