You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.