- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for fromJson (0.17 sec)
-
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) -
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)