Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 26 of 26 for fromJson (0.04 seconds)

  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)
      data class Gist(
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  2. samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java

        try (Response response = client.newCall(request).execute()) {
          // Deserialize HTTP response to concrete type.
          ResponseBody body = response.body();
          List<Contributor> contributors = CONTRIBUTORS_JSON_ADAPTER.fromJson(body.source());
    
          // Sort list by the most contributions.
          Collections.sort(contributors, (c1, c2) -> c2.contributions - c1.contributions);
    
          // Output list of contributors.
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Click Count (0)
  3. .teamcity/src/main/kotlin/model/FunctionalTestBucketModel.kt

            parallelizationMethod,
        )
    
        constructor(jsonObject: Map<String, Any>) : this(
            (jsonObject["subprojects"] as List<*>).map { it.toString() },
            ParallelizationMethod.fromJson(jsonObject),
        )
    
        fun toBuildTypeBucket(gradleSubprojectProvider: GradleSubprojectProvider): SmallSubprojectBucket =
            SmallSubprojectBucket(
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Apr 10 15:09:32 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  4. .teamcity/src/main/kotlin/model/FunctionalTestBucketGenerator.kt

            model: CIBuildModel,
        ): Map<TestCoverage, List<SmallSubprojectBucket>> {
            val sType = object : TypeToken<BuildProjectToSubprojectTestClassTimes>() {}.type
            val buildProjectClassTimes = gson.fromJson<BuildProjectToSubprojectTestClassTimes>(buildClassTimeJson.readText(), sType)
    
            val result = mutableMapOf<TestCoverage, List<SmallSubprojectBucket>>()
            for (stage in model.stages) {
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Apr 10 15:09:32 GMT 2025
    - 7.3K bytes
    - Click Count (0)
  5. build-logic/build-update-utils/src/main/kotlin/gradlebuild/buildutils/runtimes/CheckTargetRuntimes.kt

                    val detailsFile = detailsFiles[i]
                    val buildFile = buildFiles[i]
    
                    val details = detailsFile.bufferedReader().use {
                        gson.fromJson(it, TargetRuntimeDetails::class.java)
                    }
                    projects[path] = ProjectInfo(details, buildFile)
                }
            }
    
            return projects
        }
    
        /**
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Wed Mar 11 22:40:18 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  6. docs/recipes.md

                .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)
              }
            }
          }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:01:42 GMT 2026
    - 47.8K bytes
    - Click Count (0)
Back to Top