Thread
#multiplatform
    Big Chungus

    Big Chungus

    3 years ago
    Is there any way to serialize KClass with kotlinx.serialization?
    Sebastian Sellmair [JB]

    Sebastian Sellmair [JB]

    3 years ago
    This might be a dumb idea, but can’t you just send the fully qualified name of that class 🤔
    Big Chungus

    Big Chungus

    3 years ago
    That's what I'm trying now, the problem is then how do i deserialize that?
    The class lies in common module
    As in domain class i'm trying to serialize
    s

    spand

    3 years ago
    I just want to post this from the kotinx.serialization KEEP: Usually, polymorphism usage in serialization is discouraged because of the security problems it entails. However, writing complex business logic is almost impossible without this main OOP feature. In this serialization framework, we get rid of the 'deserialize-anything' security problem that plagues naive approaches to polymorphism in serialization. All serializable implementations of some abstract class must be registered in advance. This also avoids reflection usage (such as Class.forName), which makes naive polymorphic serialization hard to implement on Kotlin/JS.