https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
c

Colton Idle

07/15/2022, 12:56 AM
Idk if my brain is just fried, but I'm trying to deserialize a List of Book from my backend. The moshi docs state:
Copy code
val cardsJsonResponse: String = ...
// We can just use a reified extension!
val adapter = moshi.adapter<List<Card>>()
val cards: List<Card> = adapter.fromJson(cardsJsonResponse)
Cool. Seems simple enough:
Copy code
val adapter = moshi.adapter<List<Book>>()
Compilation error:
None of the following functions can be called with the arguments supplied.
23 Views