preparePage

private fun <T> preparePage(jPage: JsonObject, serializer: KSerializer<T>): PaginatedResponse<T>

Method used to prepare and to format the raw JsonObject obtained with the sendPaginatedRequest or sendPaginatedRequestAsyncHandlers methods in a PaginatedResponse

Return

the prepared page as PaginatedResponse of T

Parameters

jPage

The response from the request to format

serializer

The serializer of the item in the page

T

The type of the items in the PaginatedResponse