@Test public void testEscapeHtmlChar() { String str = "<>'="; assertEquals("\"" + str + "\"", JsonUtils.toJson(str)); }
public static String toJson(Object src) { try { return gson.toJson(src); } catch (JsonParseException e) { LogUtils.warn(log, LogEvents.ExecutorEvent.COMMON, "json serialize error", e); return JSON_NULL_STR; } }
JsonUtils { public static String toJson(Object src) { try { return gson.toJson(src); } catch (JsonParseException e) { LogUtils.warn(log, LogEvents.ExecutorEvent.COMMON, "json serialize error", e); return JSON_NULL_STR; } } }
JsonUtils { public static String toJson(Object src) { try { return gson.toJson(src); } catch (JsonParseException e) { LogUtils.warn(log, LogEvents.ExecutorEvent.COMMON, "json serialize error", e); return JSON_NULL_STR; } }  }
JsonUtils { public static String toJson(Object src) { try { return gson.toJson(src); } catch (JsonParseException e) { LogUtils.warn(log, LogEvents.ExecutorEvent.COMMON, "json serialize error", e); return JSON_NULL_STR; } }  static Gson getGson(); static JsonParser getJsonParser(); static String toJson(Object src); static String toJson(Object src, Type typeOfSrc); static T fromJson(String json, Type typeOfT); static T fromJson(String json, Class<T> classOfT); }
JsonUtils { public static String toJson(Object src) { try { return gson.toJson(src); } catch (JsonParseException e) { LogUtils.warn(log, LogEvents.ExecutorEvent.COMMON, "json serialize error", e); return JSON_NULL_STR; } }  static Gson getGson(); static JsonParser getJsonParser(); static String toJson(Object src); static String toJson(Object src, Type typeOfSrc); static T fromJson(String json, Type typeOfT); static T fromJson(String json, Class<T> classOfT);  }