[REQ] [Kotlin] Use Kotlinx.serialization and Sealed Class for Polymorphism
Created by: loicsiret
It will be nice to use Kotlinx serialization and sealed class to deal with Polymorphism and custom discriminator.
Describe the solution you'd like
Instead of using interface as a Parent for polymorphism, we can take advantage of kotlin sealed class.
This will allow to use a JsonContentPolymorphicSerializer
in the parent and create the Subtype mapping.
#14301