Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for fromJson (0.14 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt

            .build()
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          val gist = gistJsonAdapter.fromJson(response.body!!.source())
    
          for ((key, value) in gist!!.files!!) {
            println(key)
            println(value.content)
          }
        }
      }
    
      @JsonClass(generateAdapter = true)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (1)
Back to top