https://kotlinlang.org logo
#serialization
Title
# serialization
u

ursus

03/20/2024, 2:38 PM
I have api that takes
KSerializer<List<Foo>>
How do I get the List serializer reference? I have
ListSerializer(Foo.serializer())
but that creates a new instance every time, i.e. it's not cached the way it would if I were to just leave it up reified generics to get the serializer via
serializersModule.serializer<List<Foo>>()