<@U5G4USJPQ> For fun, I parsed it with Klaxon and ...
# announcements
c
@beatbrot For fun, I parsed it with Klaxon and the following works just fine:
Copy code
data class Track(val id: Long, val title: String)
data class TrackData(val data: List<Track>)
data class Album(val id: Int, val title: String, val link: String, val cover_big: String, val duration: Int,
val rating: Int, val tracks: TrackData)

fun t() {
  val json =
URL("<http://api.deezer.com/album/53227232>").openConnection().inputStream.reader().readText()
  Klaxon().parse<Album>(json)?.let {
    println("Album: ${it.title} ${it.tracks.data.size} tracks")
  }
}
Note that I adapted the data classes to match the shape of the JSON more closely. No need for an adapter.