Hello World,
I have litteraly dozens of Enum classes like this where the default Enum serializer don't work only because the case is different,
PascalCase in Kotlin versus snake_case when serialized.
Is it possible to somehow wrap the default serializer to add a call to
.toPascalCase()
and
.to_snake_case()
instead of having all those
@SerialName
?
p
Paul Woitaschek
03/20/2022, 5:04 PM
Copy Paste the default enums serializer and do the renaming there.
👍 1
Paul Woitaschek
03/20/2022, 5:05 PM
If it's json you can also use a jsonTransformingSerializer