Open SerVB opened 4 years ago
Note: there should be opt-out mechanism if one do not want particular child of sealed class to be serializable.
Related: #925.
there should be opt-out mechanism if one do not want particular child of sealed class to be serializable
It seems that currently if a child is not serializable, polymorphic serialization won't work at all. So maybe initially such mechanism is not needed...
Well, #925 is a bug that should be fixed)
What is your use-case and why do you need this feature? I have sealed classes for polymorphic serialization. Now I have to write
@Serializable
for all the children which is monotonous and takes many lines of code, making it less readable.Describe the solution you'd like I think if a user marked a sealed class as
@Serializable
, all the children should become serializable automatically. As the plugin already can find all the children to add them to polymorphic serialization variants, it can also mark those children.