does anyone have a working example of how to seria...
# serialization
n
does anyone have a working example of how to serialize sealed classes? for me i just get empty json objects when i use
BaseClass.serializer()
d
I don't have a self-contained one.
Have you marked the class as
@Polymorphic
nd stuff?
n
i got it sorted, it turns out
@Polymorphic
does not affect
sealed
, but once i replaced it with
abstract class
it works
Copy code
* Does not affect sealed classes, because they are gonna be serialized with subclasses automatically
 * with special compiler plugin support which would be added later.
d
Even,
@Serializable(PolymorphicSerializer::class)
?
That's what I use, rather.
n
where do i put this ? on the base class ?
d
Yup
n
and that worked
d
Sweet!