Shivam Verma
05/27/2023, 5:52 AMsuspend fun fetch(): List<Item>
. I would like to register a custom serializer for this list of items. Something like:
val format = Json {
serializersModule = SerializersModule {
contextual(List<Item>::class, CustomListSerializer(Item.serializer()))
}
}
I have also tried suspend fun fetch(): @Serializable(with = CustomListSerializer::class) List<Item>
but this also does not work.
Any pointers would be helpful 🙏Adam S
05/27/2023, 8:05 AM