use of org.apache.jena.atlas.json.JsonValue in project jena by apache.
the class LibJsonTest method read.
/** Read-compare */
public static void read(String string, JsonValue expected) {
JsonValue v = JSON.parseAny(string);
assertEquals(expected, v);
}
use of org.apache.jena.atlas.json.JsonValue in project jena by apache.
the class LibJsonTest method writeRead.
/** Round trip json->string->json */
public static void writeRead(JsonValue v) {
String str2 = v.toString();
JsonValue v2 = JSON.parseAny(str2);
assertEquals(v, v2);
}
use of org.apache.jena.atlas.json.JsonValue in project jena by apache.
the class TestJsonWriter method test.
private static void test(String str, String expected) {
JsonValue v = new JsonString(str);
str = v.toString();
assertEquals(expected, str);
}
use of org.apache.jena.atlas.json.JsonValue in project jena by apache.
the class ActionContainerItem method execGet.
protected void execGet(HttpAction action) {
JsonValue v;
if (isContainerAction(action))
v = execGetContainer(action);
else
v = execGetItem(action);
ServletOps.sendJsonReponse(action, v);
}
use of org.apache.jena.atlas.json.JsonValue in project jena by apache.
the class ActionContainerItem method execPost.
protected void execPost(HttpAction action) {
JsonValue v;
if (isContainerAction(action))
v = execPostContainer(action);
else
v = execPostItem(action);
ServletOps.sendJsonReponse(action, v);
}
Aggregations