@Test public void testToJson() { String aj = JsonUtils.toJson(a, false); assertEquals(aJsonString, aj); String aj2Compact = JsonUtils.toJson(a2, false); assertEquals(a2Compact, aj2Compact); String aj2Verbose = JsonUtils.toJson(a2, true); assertEquals(a2Verbose, aj2Verbose); }
public static String toJson(Object o, boolean verbose) { return verbose ? gsonVerbose.toJson(o) : gsonCompact.toJson(o); }
JsonUtils { public static String toJson(Object o, boolean verbose) { return verbose ? gsonVerbose.toJson(o) : gsonCompact.toJson(o); } }
JsonUtils { public static String toJson(Object o, boolean verbose) { return verbose ? gsonVerbose.toJson(o) : gsonCompact.toJson(o); } private  JsonUtils(); }
JsonUtils { public static String toJson(Object o, boolean verbose) { return verbose ? gsonVerbose.toJson(o) : gsonCompact.toJson(o); } 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 String toJson(Object o, boolean verbose) { return verbose ? gsonVerbose.toJson(o) : gsonCompact.toJson(o); } 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);  }