Marcin Wisniowski
04/04/2021, 4:40 PM@Serializable(with = MySerializer::class) val item: MyClass
But now I need to serialize a list of these items:
val items: List<MyClass>
How can I make it work? I cannot use the same annotation, since now it's a List
.Marcin Wisniowski
04/04/2021, 5:07 PM@file:UseSerializers(MySerializer::class)
Annotating the file like this seems to work, but it doesn't feel clean. I'd rather have this specified only for the field, or the containing class at least.rnett
04/04/2021, 7:57 PM@Serializable
on the type? I.e. List<@Serializable(...) MyClass>
. I don't have an IDE in front of me but I think I've seen that before.