JsonObject json;
try {
JsonElement element = new JsonParser().parse(
new InputStreamReader(responseEntity.getBody().getInputStream())
);
json = element.getAsJsonObject();
} catch (IOException e) {
throw new RuntimeException(e.getLocalizedMessage());
}
Created
April 10, 2017 06:00
-
-
Save RealDeanZhao/af5ef2d1d6eb98729103cc16028e177f to your computer and use it in GitHub Desktop.
Parse InputStream to JsonObject
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment