- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for fromJson (0.04 sec)
-
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 = STORY_JSON_ADAPTER.fromJson(source)!! private fun readStory(file: Path): Story {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.3K bytes - Viewed (0) -
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jul 06 19:30:55 UTC 2018 - 4.4K bytes - Viewed (0) -
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(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.6K bytes - Viewed (0) -
.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(
Registered: Wed Sep 10 11:36:15 UTC 2025 - Last Modified: Thu Apr 10 15:09:32 UTC 2025 - 3.4K bytes - Viewed (0) -
.github/workflows/build-docs.yml
build-docs: needs: - changes - langs if: ${{ needs.changes.outputs.docs == 'true' }} runs-on: ubuntu-latest strategy: matrix: lang: ${{ fromJson(needs.langs.outputs.langs) }} steps: - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - uses: actions/checkout@v5
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Fri Aug 15 21:44:06 UTC 2025 - 4.1K bytes - Viewed (0) -
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.8K bytes - Viewed (0) -
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.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 2.2K bytes - Viewed (0) -
.github/workflows/contributor-pr.yml
unit-test: name: "${{ matrix.bucket.name }} (Unit Test)" permissions: contents: read runs-on: ubuntu-latest needs: build strategy: matrix: bucket: ${{ fromJson(needs.build.outputs.matrix) }} fail-fast: false steps: - name: git clone uses: actions/checkout@v5 - name: setup java uses: actions/setup-java@v5 with:
Registered: Wed Sep 10 11:36:15 UTC 2025 - Last Modified: Thu Sep 04 22:13:34 UTC 2025 - 4.1K bytes - Viewed (0) -
.teamcity/src/main/kotlin/configurations/FunctionalTest.kt
} class TeamCityParallelTests( val numberOfBatches: Int, ) : ParallelizationMethod() companion object { private val objectMapper = ObjectMapper() fun fromJson(jsonObject: Map<String, Any>): ParallelizationMethod { val methodJsonNode = (jsonObject["parallelizationMethod"] as? Map<*, *>)?.let { objectMapper.valueToTree<JsonNode>(it) }
Registered: Wed Sep 10 11:36:15 UTC 2025 - Last Modified: Wed Feb 12 09:12:03 UTC 2025 - 5.6K bytes - Viewed (0) -
.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) {
Registered: Wed Sep 10 11:36:15 UTC 2025 - Last Modified: Thu Apr 10 15:09:32 UTC 2025 - 7.3K bytes - Viewed (0)