Can I somehow replace the default `Instant` serial...
# serialization
c
Can I somehow replace the default
Instant
serializer? I don't want to annotate every
Instant
with
@Serializable(with = ...)
or
@Contextual
a
you can write on the top of the file: @file:UseSerializers(DateAsLongSerializer::class)
c
Ohh, this is what I was looking for:
typealias DateAsText = @Serializable(DateAsSimpleTextSerializer::class) Date
Thanks for pointing me into the right direction!
a
Ah yes, even better, I forgot about it
n
@Christian Würthenr, thank you! I've been sprinkling
@Contextual
in my code all over the place and didn't know this was a feature!