@Test public void testAddNode() { ObjectNode j = JsonUtils.newObjectNode("key", "value"); ObjectNode j2 = JsonUtils.addNode(j, "key2", "value2"); assertEquals("{\"key\":value,\"key2\":value2}", j.toString()); assertEquals("{\"key\":value,\"key2\":value2}", j2.toString()); }
public static ObjectNode addNode(ObjectNode tree, String fieldName, Object fieldValue) { tree.putPOJO(fieldName, fieldValue); return tree; }
JsonUtils { public static ObjectNode addNode(ObjectNode tree, String fieldName, Object fieldValue) { tree.putPOJO(fieldName, fieldValue); return tree; } }
JsonUtils { public static ObjectNode addNode(ObjectNode tree, String fieldName, Object fieldValue) { tree.putPOJO(fieldName, fieldValue); return tree; } private  JsonUtils(); }
JsonUtils { public static ObjectNode addNode(ObjectNode tree, String fieldName, Object fieldValue) { tree.putPOJO(fieldName, fieldValue); return tree; } private  JsonUtils(); static String toJson(Object o, boolean verbose); static Object fromJson(String s, Class<?> clazz); static Object jacksonFromJson(String s, Class<?> clazz); static String newJson(String key, Object value); static ObjectNode cloneObjectNode(ObjectNode src); static ObjectNode newObjectNode(String key, Object value); static ObjectNode addNode(ObjectNode tree, String fieldName, Object fieldValue); static JsonNode getJsonNode(String tree, String fieldName); static ObjectNode newNode(); static ArrayNode newArrayNode(); static ObjectNode toObjectNode(String tree); static JSONObject toJSONObject(String json); static boolean isValid(String tree); static HashMap<String, JsonNode> jsonNodeToHashMap(JsonNode jsonNode); static String jsonKeyValue(String key, String value); static BigDecimal decimalValue(JsonNode v); }
JsonUtils { public static ObjectNode addNode(ObjectNode tree, String fieldName, Object fieldValue) { tree.putPOJO(fieldName, fieldValue); return tree; } private  JsonUtils(); static String toJson(Object o, boolean verbose); static Object fromJson(String s, Class<?> clazz); static Object jacksonFromJson(String s, Class<?> clazz); static String newJson(String key, Object value); static ObjectNode cloneObjectNode(ObjectNode src); static ObjectNode newObjectNode(String key, Object value); static ObjectNode addNode(ObjectNode tree, String fieldName, Object fieldValue); static JsonNode getJsonNode(String tree, String fieldName); static ObjectNode newNode(); static ArrayNode newArrayNode(); static ObjectNode toObjectNode(String tree); static JSONObject toJSONObject(String json); static boolean isValid(String tree); static HashMap<String, JsonNode> jsonNodeToHashMap(JsonNode jsonNode); static String jsonKeyValue(String key, String value); static BigDecimal decimalValue(JsonNode v);  }