I may be wrong, but I think kotlin.time.Instant an...
# serialization
v
I may be wrong, but I think kotlin.time.Instant and kotlinx.datetime.Instant serialize differently. My API sends a kotlinx.datetime.Instant and it appears in Json as "2025-09-06T103224.608Z" . I think. Maybe. Can anyone confirm if the two Instant classes serialize differently?
h
Both use ISO8601 by default. The kotlin.time.Instant implementation was just copy pasted into stdlib.
v
Hmm. I wonder why I'm getting an error about there being no serializer for kotlin.time.Instant then? I am on kotlin 2.2.20.
h
You also need kotlinx-serialization runtime 1.9.0
v
I think I had an older version being pulled in by ktor-serialization; I'm on an older version of Ktor client for now.
Serves me right for letting AI do the coding... :)