- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for fromJson (0.19 sec)
-
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 May 03 11:42:14 GMT 2024 - Last Modified: Fri Jul 06 19:30:55 GMT 2018 - 4.4K bytes - Viewed (1) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K 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); } } }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 1.8K bytes - Viewed (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/upgrades/UpgradedProperties.java
File file = new File(path); if (!file.exists()) { return Collections.emptyList(); } try { return new Gson().fromJson(new FileReader(file), new TypeToken<List<UpgradedProperty>>() {}.getType()); } catch (FileNotFoundException e) { throw new UncheckedIOException(e); } } /**
Java - Registered: Wed May 01 11:36:15 GMT 2024 - Last Modified: Tue Apr 23 08:40:36 GMT 2024 - 6.8K bytes - Viewed (0)