Thread
#serialization
    a

    aidanvii

    11 months ago
    Does polymorphic deserialisation work with sealed interfaces? Just wondering as it’s ever so slightly less verbose than sealed classes.
    sindrenm

    sindrenm

    11 months ago
    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

    aidanvii

    11 months ago
    p

    pdvrieze

    11 months ago
    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.