@Test public void testSerializeSortField_01() { SortField sf = new SortField("identifications.defaultClassification.genus", SortOrder.DESC); String serialized = JsonUtil.toPrettyJson(sf, false); String file = "json/JsonUtilTest__testSerializeSortField_01.json"; assertTrue("01", stringEqualsFileContents(serialized, file)); }
public static String toPrettyJson(Object obj) { return toPrettyJson(obj, true); }
JsonUtil { public static String toPrettyJson(Object obj) { return toPrettyJson(obj, true); } }
JsonUtil { public static String toPrettyJson(Object obj) { return toPrettyJson(obj, true); } private  JsonUtil(); }
JsonUtil { public static String toPrettyJson(Object obj) { return toPrettyJson(obj, true); } private  JsonUtil(); static T deserialize(byte[] json, Class<T> type); static T deserialize(byte[] json, TypeReference<T> type); static T deserialize(ObjectMapper om, byte[] json, Class<T> type); static T deserialize(ObjectMapper om, byte[] json, TypeReference<T> type); static T deserialize(String json, Class<T> type); static T deserialize(String json, TypeReference<T> type); static Map<String, Object> deserialize(byte[] json); static Map<String, Object> deserialize(String json); static Map<String, Object> deserialize(InputStream src); static T deserialize(InputStream src, Class<T> type); static T deserialize(InputStream src, TypeReference<T> type); static Object readField(byte[] json, String path); static Object readField(String json, String path); static Object readField(InputStream src, String path); static Object readField(Map<String, Object> map, String path); @SuppressWarnings("unchecked") static Object readField(Map<String, Object> map, Path path); static T convert(Map<String, Object> map, Class<T> type); static T convert(Map<String, Object> map, TypeReference<T> type); static byte[] serialize(Object obj); static String toJson(Object obj); static String toPrettyJson(Object obj); static String toPrettyJson(Object obj, boolean terse); }
JsonUtil { public static String toPrettyJson(Object obj) { return toPrettyJson(obj, true); } private  JsonUtil(); static T deserialize(byte[] json, Class<T> type); static T deserialize(byte[] json, TypeReference<T> type); static T deserialize(ObjectMapper om, byte[] json, Class<T> type); static T deserialize(ObjectMapper om, byte[] json, TypeReference<T> type); static T deserialize(String json, Class<T> type); static T deserialize(String json, TypeReference<T> type); static Map<String, Object> deserialize(byte[] json); static Map<String, Object> deserialize(String json); static Map<String, Object> deserialize(InputStream src); static T deserialize(InputStream src, Class<T> type); static T deserialize(InputStream src, TypeReference<T> type); static Object readField(byte[] json, String path); static Object readField(String json, String path); static Object readField(InputStream src, String path); static Object readField(Map<String, Object> map, String path); @SuppressWarnings("unchecked") static Object readField(Map<String, Object> map, Path path); static T convert(Map<String, Object> map, Class<T> type); static T convert(Map<String, Object> map, TypeReference<T> type); static byte[] serialize(Object obj); static String toJson(Object obj); static String toPrettyJson(Object obj); static String toPrettyJson(Object obj, boolean terse); static final Object MISSING_VALUE; }