There is a service file:
interface DevbyteService {
@GET("devbytes.json")
fun getPlaylist(): Deferred<NetworkVideoContainer>
}
private val moshi = Moshi.Builder()
.add(KotlinJsonAdapterFactory())
.build()
object Network {
// Configure retrofit to parse JSON and use coroutines
private val retrofit = Retrofit.Builder()
.baseUrl("https://devbytes.udacity.com/")
.addConverterFactory(MoshiConverterFactory.create(moshi))
.addCallAdapterFactory(CoroutineCallAdapterFactory())
.build()
val devbytes = retrofit.create(DevbyteService::class.java)
}
So, I get a list of NetworkVideoContainer. This works fine but I want to see also a raw json answer, for example in logs. How to do it?