Does polymorphic deserialisation work with sealed ...
# serialization
a
Does polymorphic deserialisation work with sealed interfaces? Just wondering as it’s ever so slightly less verbose than sealed classes.
s
Nope. I believe it's because you need
@Serializable
on the sealed type, which can't be applied to an interface, but there could be other reasons, too.
a
p
Making serializable interfaces could be supported if all children are either sealed interfaces or class/object types. As such there is a little more complexity than obvious, but it is something that will likely be supported in the future.