Thread
#serialization
    Robert Jaros

    Robert Jaros

    1 year ago
    Anything changed with serialization of enum classes in 1.0.0 on Kotlin/JS? I have the following error when I try to serialize enum class without
    @Serializable
    annotation:
    SerializationException: Serializer for class 'Test' is not found.
    Mark the class as @Serializable or provide the serializer explicitly.
    On Kotlin/JS explicitly declared serializer should be used for interfaces and enums without @Serializable annotation
    It works when I use
    @Serializable
    , but the documentation states enum do not need this annotation:https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/builtin-classes.md#enum-classes
    s

    sandwwraith

    1 year ago
    They do not need it when used inside objects. For top-level enums it's better to use
    @Serializable
    Robert Jaros

    Robert Jaros

    1 year ago
    Thx for the clarification.