Hi, I have to create a serializer for a sealed int...
# serialization
a
Hi, I have to create a serializer for a sealed interface that has multiple interfaces as children that are not sealed, but every interfaces just has a
asString()
method that is used for serialization (I don't need deserialization at all). So I created a simple
ArgumentSerializer
serializer for that (
Argument
is my sealed interface), but when I apply my
ArgumentSerializer
to any children interface, it says that the serializer is only applicable to type
Argument
and that it could lead to errors. Is there a way to create a serializer that works for a sealed interface and all of it children without producing a warning ?