Hi, all. Maybe someone can help me understand what...
# ktor
v
Hi, all. Maybe someone can help me understand what is the problem with my code for class serialization? Not to polute the channel posted question on stackoverflow. Thanks in advance! https://stackoverflow.com/questions/71988144/serializer-for-class-is-not-found-mark-the-class-as-serializable-or-prov
c
Better ask in #serialization but I think the issue is with the generic type.
v
posted the question there. I wonder what is better solution to type an answer without generic for pagination in ktor?
yeah you are right, this works but it is not reusable(
Copy code
@Serializable
data class PaginatedResponse(
    val prev: Int?,
    val next: Int?,
    val totalCount: Long = 0,
    val totalPages: Long = 0,
    val data: List<User>? = null,
    val message: String? = null
) : BaseResponse<User>
c
I guess you have to write your own “Serializer” for
PaginatedResponse