APISonar


ai.grakn.graql.internal.printer.Printers.json

> ai > grakn > graql > internal > printer > Printers > json
ai APIs grakn APIs graql APIs internal APIs printer APIs Printers APIs json APIs

Example 1
public void GETGraqlMatchWithGraqlJsonType_ResponseIsCorrectGraql(){
        String query = "match $x isa person;";
        Response response = sendGET(APPLICATION_JSON_GRAQL);

        Json expectedResponse = Json.read(
                Printers.json().graqlString(graphContext.graph().graql().parse(query).execute()));
        assertThat(jsonResponse(response), equalTo(expectedResponse));
    }