Skip to content

SealedClassSerializer currently requires to OptIn to InternalSerializationApi #2721

@floschu

Description

@floschu

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

We use SealedClassSerializer to manually generate KSerializers for sealed classes/sealed interfaces that are out of our scope and cannot be annotated with @Serializable and auto generate KSerializers.

This works currently and we use it, however we fear that due to the fact that it is an effective internal api, the implementation could change on a minor version release.
In the end, if this change would happen and would break our code, we could then still copy the internal code of the previous version and use it, but it would be nice to have a public way to manually do serialization of sealed classes. :)

Describe the solution you'd like

  1. Maybe there is something we are missing and there is a public way to serialize sealed classes which we have not found? 🤔
  2. If not, do not require SealedClassSerializer to OptIn to InternalSerializationApi.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions