Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for fromJson (0.1 sec)

  1. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/AcceptedApiChanges.groovy

            def acceptedApiChanges = new AcceptedApiChanges()
            acceptedApiChanges.acceptedChanges = [:]
            for (String jsonText : jsonTexts) {
                def json = new Gson().fromJson(jsonText, new TypeToken<Map<String, List<AcceptedApiChange>>>() {}.type)
                Map<ApiChange, String> acceptedChanges = json.acceptedApiChanges.collectEntries { jsonChange ->
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Jun 04 14:00:46 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. samples/slack/src/main/java/okhttp3/slack/SlackApi.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.slack;
    
    import com.squareup.moshi.FromJson;
    import com.squareup.moshi.JsonAdapter;
    import com.squareup.moshi.Moshi;
    import com.squareup.moshi.ToJson;
    import java.io.IOException;
    import okhttp3.Call;
    import okhttp3.HttpUrl;
    import okhttp3.WebSocket;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Jul 06 19:30:55 UTC 2018
    - 4.4K bytes
    - Viewed (0)
  3. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

              @FromJson fun byteStringFromJson(json: String) = json.decodeHex()
            },
          )
          .add(KotlinJsonAdapterFactory())
          .build()
      private val STORY_JSON_ADAPTER = MOSHI.adapter(Story::class.java)
    
      private val fileSystem = FileSystem.SYSTEM
    
      private fun readStory(source: BufferedSource): Story {
        return STORY_JSON_ADAPTER.fromJson(source)!!
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. build-logic/build-update-utils/src/main/kotlin/gradlebuild.wrapper.gradle.kts

        }
    
        tasks.register(configureWrapperTaskName) {
            doLast {
                val jsonText = URI("https://services.gradle.org/versions/$label").toURL().readText()
                val versionInfo = Gson().fromJson(jsonText, VersionDownloadInfo::class.java)
                println("updating wrapper to $label version: ${versionInfo.version} (downloadUrl: ${versionInfo.downloadUrl})")
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Sep 17 08:58:33 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  5. build-logic/dependency-modules/src/main/kotlin/gradlebuild.dependency-modules.gradle.kts

    fun readCapabilities(source: File): List<CapabilitySpec> {
        JsonReader(source.reader(Charsets.UTF_8)).use { reader ->
            reader.isLenient = true
            return Gson().fromJson(reader)
        }
    }
    
    inline
    fun <reified T> Gson.fromJson(json: JsonReader): T = this.fromJson(json, object : TypeToken<T>() {}.type)
    
    
    abstract class CapabilityRule @Inject constructor(
        val name: String,
        val version: String
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Jun 05 20:15:18 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  6. build-logic/build-update-utils/src/main/kotlin/gradlebuild.update-versions.gradle.kts

        currentReleasedVersion = project.provider {
            val jsonText = URI("https://services.gradle.org/versions/nightly").toURL().readText()
            println(jsonText)
            val versionInfo = Gson().fromJson(jsonText, VersionBuildTimeInfo::class.java)
            ReleasedVersion(versionInfo.version, versionInfo.buildTime)
        }
    }
    
    tasks.register<UpdateAgpVersions>("updateAgpVersions") {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Fri Oct 11 18:33:20 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. 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)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/ParseResponseWithMoshi.java

            .build();
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          Gist gist = gistJsonAdapter.fromJson(response.body().source());
    
          for (Map.Entry<String, GistFile> entry : gist.files.entrySet()) {
            System.out.println(entry.getKey());
            System.out.println(entry.getValue().content);
          }
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.8K bytes
    - Viewed (0)
  9. build-logic-commons/module-identity/src/main/kotlin/gradlebuild/identity/extension/ReleasedVersionsDetails.kt

            lowestTestedVersion = GradleVersion.version("3.0")
            lowestInterestingVersion = GradleVersion.version("0.8")
    
            val releasedVersions = releasedVersionsFile.asFile.reader().use {
                Gson().fromJson(it, ReleasedVersions::class.java)
            }
    
            val latestFinalRelease = releasedVersions.finalReleases.first()
            val latestRelease =
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Mon Jun 10 06:17:20 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  10. build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/AbstractAcceptedApiChangesMaintenanceTask.kt

                    it.value.acceptedApiChanges!!
                } ?: emptyMap()
        }
    
        private
        fun File.readAcceptedChanges(): AcceptedApiChanges {
            val jsonString = this.readText()
            return Gson().fromJson(jsonString, AcceptedApiChanges::class.java)
        }
    
        /**
         * Sorts the given list of [AcceptedApiChange]s by type and member.
         * <p>
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Jun 04 14:00:46 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top