InstantJsonFormatter

Encode an instant as a JSON string like "1950-01-01T00:00:00Z". From the spec:

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted.

Functions

Link copied to clipboard
open override fun fromString(value: String): Instant

The source of value may have been a string or numeric literal.

Link copied to clipboard
open override fun toStringOrNumber(value: Instant): Any

Returns either a String or a Number.