https://kotlinlang.org logo
#serialization
Title
# serialization
m

Marc Knaup

05/25/2019, 3:56 PM
Don't enums have a
.serializer()
function by default?
s

sandwwraith

05/27/2019, 10:18 AM
No, they're not modified by the plugin
m

Marc Knaup

05/27/2019, 10:19 AM
How do I get their default serializer then?
s

sandwwraith

05/27/2019, 10:20 AM
They're treated somehow as primitives – there is a
encodeEnum
function, just like
encodeInt
which does not accept serializer. If you need to treat it like an object, take a look at `EnumSerializer`/`CommonEnumSerializer`
🙏 1
4 Views