Hey everyone, I have the following response classes. Check
this to get some more context about why I have structured it as below.
@Serializable
sealed interface PaginatedItems
@Serializable
data class GetPaginatedResponse(
val isNext: Boolean,
val content: PaginatedItems
)
@Serializable
data class TracksPage(
val items: List<TrackInfo>
) : PaginatedItems
Now, when I hit my endpoint I get the following json
{
"isNext": false,
"content": {
"type": "io.github.rubenquadros.vibesync.server.model.MediaPage",
"items": []
}
}
I don't understand how this
type
param is getting added in the json