kotlinx.serialization icon indicating copy to clipboard operation
kotlinx.serialization copied to clipboard

Add a descriptor kind for JsonContentPolymorphicSerializer

Open kunyavskiy opened this issue 1 year ago • 0 comments

What is your use-case and why do you need this feature?

When you use JsonContentPolymorphicSerializer, it's impossible to specify a list of shapes you expect, while it's still useful for schema exporing.

Describe the solution you'd like

Probably, it should be a new descriptorKind in PolymorficKind and some utility function like

buildContentBasedDescriptor(options: List<SerialDescriptor>

to build it.

kunyavskiy avatar Jun 02 '24 07:06 kunyavskiy