Commit f28ae77af2d8f4476d0ef86ff2d7aa7bd6b7dd3d

Authored by jiangjiazhi
1 parent 6c02acbbdd

修改新电子病历

Showing 1 changed file with 11 additions and 0 deletions

platform-common/src/main/java/com/lyms/platform/common/utils/JsonUtil.java View file @ f28ae77
... ... @@ -22,6 +22,17 @@
22 22 return null;
23 23 }
24 24  
  25 + public static String obj2Str(
  26 + Object cls) {
  27 + try {
  28 + ObjectMapper objectMapper = new ObjectMapper();
  29 + return objectMapper.writeValueAsString(cls);
  30 + } catch (Exception e) {
  31 +
  32 + }
  33 + return null;
  34 + }
  35 +
25 36 @SuppressWarnings("unchecked")
26 37 public static <T> T str2Obj(String content,
27 38 Class<T> cls) {