Denys
04/26/2021, 1:22 PM@Serializable
data class PagedResult<T, P : PagedResult.Pagination>(val items: List<T>, val pagination: P)
Everything works fine until the moment when I enable Proguard. An error like this occurs: java.lang.IllegalArgumentException: Unable to create converter for f.a.b.d.i.g.a<> (). f.a.b.d.i.g.a is just a class PagedResult (I see it in mapping.txt) The rules for Proguard are taken from the official kotlinx.serialization repository. Can someone tell me what the problem is?ephemient
04/26/2021, 2:13 PMephemient
04/26/2021, 2:14 PMJson.encodeToString<T>()
Json.decodeFromString<T>()
look up the serializer reflectively, which means Proguard doesn't see a hard reference to itephemient
04/26/2021, 2:16 PMval serializer = PagedResult.serializer(ItemType.serializer(), PaginationType.serializer())
Json.encodeToString(serializer, data)
Json.decodeFromString(serializer, data)