Package com.jcabi.http.response

Examples of com.jcabi.http.response.JsonResponse.json()


        final JsonResponse resp = github.entry()
            .uri().path("/search/repositories")
            .queryParam("q", "java").back()
            .fetch()
            .as(JsonResponse.class);
        final List<JsonObject> items = resp.json().readObject()
            .getJsonArray("items")
            .getValuesAs(JsonObject.class);
        for (final JsonObject item : items) {
            System.out.println(
                String.format(
View Full Code Here


    public void readNonUnicode() throws Exception {
        final Response resp = new FakeRequest()
            .withBody("{\"help\": \"\u001Fblah\u0001cwhoa\u0000!\"}").fetch();
        final JsonResponse response = new JsonResponse(resp);
        MatcherAssert.assertThat(
            response.json().readObject().getString("help"),
            Matchers.is("\u001Fblah\u0001cwhoa\u0000!")
        );
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.