Skip to content

[REQ] [Kotlin] Use Kotlinx.serialization and Sealed Class for Polymorphism #14548

Open
@loicsiret

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions