Hi!
I wonder why List<T>, where T is @Serializable is not @Serializable itself? There's a
T.serializer().list
serializer, that does exactly what I expect from List<T>.serializer(), but with this approach it seems like I have to write a custom serializer for any class that contains List in it
i
itnoles
07/04/2020, 2:25 PM
you could do something similiar of this
Copy code
fun <retified T : Any> listSerializer(json: Json) : List<T> { return json.parse(T::class.serializer().list) }