public DefaultImprovement deserialize(String jsonData) { try { final JsonObject jsonObject = (JsonObject) Jsoner.deserialize(jsonData); return deserialize(jsonObject); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public Collection<ReleaseNotesData> deserialize(String jsonData) { try { final JsonArray jsonArray = (JsonArray) Jsoner.deserialize(jsonData); return deserialize(jsonArray); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public DefaultContributionSet deserialize(String jsonData) { try { final JsonObject jsonObject = (JsonObject) Jsoner.deserialize(jsonData); return deserialize(jsonObject); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public DefaultContributionSet deserialize(String jsonData) { try { final JsonObject jsonObject = (JsonObject) Jsoner.deserialize(jsonData); return deserialize(jsonObject); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public GitCommit deserialize(String jsonData) { try { final JsonObject jsonObject = (JsonObject) Jsoner.deserialize(jsonData); return deserialize(jsonObject); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public DefaultImprovement deserialize(String jsonData) { try { final JsonObject jsonObject = (JsonObject) Jsoner.deserialize(jsonData); return deserialize(jsonObject); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public GitCommit deserialize(String jsonData) { try { final JsonObject jsonObject = (JsonObject) Jsoner.deserialize(jsonData); return deserialize(jsonObject); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public Collection<ReleaseNotesData> deserialize(String jsonData) { try { final JsonArray jsonArray = (JsonArray) Jsoner.deserialize(jsonData); return deserialize(jsonArray); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public DefaultImprovement deserialize(String jsonData) { try { final JsonObject jsonObject = (JsonObject) Jsoner.deserialize(jsonData); return deserialize(jsonObject); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
public Collection<ReleaseNotesData> deserialize(String jsonData) { try { final JsonArray jsonArray = (JsonArray) Jsoner.deserialize(jsonData); return deserialize(jsonArray); } catch (DeserializationException e) { throw new RuntimeException("Can't deserialize JSON: " + jsonData, e); } }
private JsonObject parseJsonFrom(URLConnection urlConnection) throws IOException, DeserializationException { InputStream response = urlConnection.getInputStream(); String content = IOUtil.readFully(response); LOG.info("GitHub API responded successfully."); return (JsonObject) Jsoner.deserialize(content); } }
private JsonObject parseJsonFrom(URLConnection urlConnection) throws IOException, DeserializationException { InputStream response = urlConnection.getInputStream(); String content = IOUtil.readFully(response); LOG.info("GitHub API responded successfully."); return (JsonObject) Jsoner.deserialize(content); } }
private JsonObject parseJsonFrom(URLConnection urlConnection) throws IOException, DeserializationException { InputStream response = urlConnection.getInputStream(); String content = IOUtil.readFully(response); LOG.info("GitHub API responded successfully."); return (JsonObject) Jsoner.deserialize(content); } }
private List<JsonObject> parseJsonFrom(URLConnection urlConnection) throws IOException, DeserializationException { InputStream response = urlConnection.getInputStream(); LOG.info("Reading remote stream from GitHub API"); String content = IOUtil.readFully(response); LOG.info("GitHub API responded successfully."); @SuppressWarnings("unchecked") List<JsonObject> issues = (List<JsonObject>) Jsoner.deserialize(content); LOG.info("GitHub API returned {} Json objects.", issues.size()); return issues; }
private List<JsonObject> parseJsonFrom(URLConnection urlConnection) throws IOException, DeserializationException { InputStream response = urlConnection.getInputStream(); LOG.info("Reading remote stream from GitHub API"); String content = IOUtil.readFully(response); LOG.info("GitHub API responded successfully."); @SuppressWarnings("unchecked") List<JsonObject> issues = (List<JsonObject>) Jsoner.deserialize(content); LOG.info("GitHub API returned {} Json objects.", issues.size()); return issues; }
private List<JsonObject> parseJsonFrom(URLConnection urlConnection) throws IOException, DeserializationException { InputStream response = urlConnection.getInputStream(); LOG.info("Reading remote stream from GitHub API"); String content = IOUtil.readFully(response); LOG.info("GitHub API responded successfully."); @SuppressWarnings("unchecked") List<JsonObject> issues = (List<JsonObject>) Jsoner.deserialize(content); LOG.info("GitHub API returned {} Json objects.", issues.size()); return issues; }
/** * Creates a Gist with the given fileContent and uploads it. * Returns the url that you can use to access the uploaded Gist. * * @param fileContent the content which will be uploaded */ public String uploadFile(String fileName, String fileContent) throws Exception { String body = getBody(fileName, fileContent); String response = gitHubApi.post("/gists", body); JsonObject responseJson = (JsonObject) Jsoner.deserialize(response); return responseJson.getString("html_url"); }
/** * Creates a Gist with the given fileContent and uploads it. * Returns the url that you can use to access the uploaded Gist. * * @param fileContent the content which will be uploaded */ public String uploadFile(String fileName, String fileContent) throws Exception { String body = getBody(fileName, fileContent); String response = gitHubApi.post("/gists", body); JsonObject responseJson = (JsonObject) Jsoner.deserialize(response); return responseJson.getString("html_url"); }
private JsonObject getStatusCheck(MergePullRequestTask task, GitHubApi gitHubApi) throws IOException { String relativeUrl = "/repos/" + task.getUpstreamRepositoryName() + "/commits/" + task.getPullRequestSha() + "/status"; LOG.lifecycle("Using {} for status check", relativeUrl); String statusesResponse = gitHubApi.get(relativeUrl); return Jsoner.deserialize(statusesResponse, new JsonObject()); }
private JsonObject getStatusCheck(MergePullRequestTask task, GitHubApi gitHubApi) throws IOException { String relativeUrl = "/repos/" + task.getUpstreamRepositoryName() + "/commits/" + task.getPullRequestSha() + "/status"; LOG.lifecycle("Using {} for status check", relativeUrl); String statusesResponse = gitHubApi.get(relativeUrl); return Jsoner.deserialize(statusesResponse, new JsonObject()); }