Just getting my grips with kotlinx.serialization. ...
# serialization
v
Just getting my grips with kotlinx.serialization. If I have a class
MDCacheItem
which is
@Serializable
(and I do, I've got that working fine and have written custom serializers), what do I need to do to serialize a
Set<MDCacheItem>
?
val jsonData = json.stringify(MDCacheItem.serializer(), setToCache)
is not allowed.
s
MDCacheItem.serializer().set
is what you want
👍 1
v
Well, that was straightforward! Thanks.