Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for fromJson (0.22 sec)

  1. 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)!!
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K 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;
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 19:30:55 GMT 2018
    - 4.4K bytes
    - Viewed (1)
  3. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/AcceptedApiChanges.groovy

        GradleVersion baseVersion
        Map<ApiChange, String> acceptedChanges
    
        static AcceptedApiChanges parse(String jsonText) {
            def acceptedApiChanges = new AcceptedApiChanges()
            def json = new Gson().fromJson(jsonText, new TypeToken<Map<String, List<AcceptedApiChange>>>() {}.type)
            acceptedApiChanges.acceptedChanges = json.acceptedApiChanges.collectEntries { jsonChange ->
    Groovy
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 1.7K bytes
    - Viewed (0)
  4. .github/workflows/gitstream.yml

    # Code generated by gitStream GitHub app - DO NOT EDIT
    
    name: gitStream workflow automation
    run-name: |
      /:\ gitStream: PR #${{ fromJSON(fromJSON(github.event.inputs.client_payload)).pullRequestNumber }} from ${{ github.event.inputs.full_repository }}
    
    on:
      workflow_dispatch:
        inputs:
          client_payload:
            description: The Client payload
            required: true
          full_repository:
    Others
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Apr 19 12:22:37 GMT 2024
    - 1.6K 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
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Wed Aug 24 23:27:45 GMT 2022
    - 9.1K bytes
    - Viewed (0)
  6. 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);
          }
        }
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.8K bytes
    - Viewed (0)
  7. build-logic/build-update-utils/src/main/kotlin/gradlebuild.wrapper.gradle.kts

        }
    
        tasks.register(configureWrapperTaskName) {
            doLast {
                val jsonText = URL("https://services.gradle.org/versions/$label").readText()
                val versionInfo = Gson().fromJson(jsonText, VersionDownloadInfo::class.java)
                println("updating wrapper to $label version: ${versionInfo.version} (downloadUrl: ${versionInfo.downloadUrl})")
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Sat Sep 30 16:17:28 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  8. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (1)
  9. build-logic/build-update-utils/src/main/kotlin/gradlebuild.update-versions.gradle.kts

        currentReleasedVersion = project.provider {
            val jsonText = URL("https://services.gradle.org/versions/nightly").readText()
            println(jsonText)
            val versionInfo = Gson().fromJson(jsonText, VersionBuildTimeInfo::class.java)
            ReleasedVersion(versionInfo.version, versionInfo.buildTime)
        }
    }
    
    tasks.register<UpdateAgpVersions>("updateAgpVersions") {
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Wed Nov 29 10:17:36 GMT 2023
    - 2K bytes
    - Viewed (0)
  10. 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.
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
Back to top