Commit 8024b16081188265c7a22466238e1385a22677c3
1 parent
3f75d838c2
Exists in
master
and in
6 other branches
儿童隐藏姓名、居住地信息
Showing 1 changed file with 3 additions and 0 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/JsonUtil.java
View file @
8024b16
... | ... | @@ -77,6 +77,9 @@ |
77 | 77 | |
78 | 78 | public static String obj2JsonString(Object obj) { |
79 | 79 | try { |
80 | + if(obj==null){ | |
81 | + return null; | |
82 | + } | |
80 | 83 | return JSONObject.fromObject(obj).toString(); |
81 | 84 | } catch (Exception e) { |
82 | 85 | ExceptionUtils.catchException(e, "obj2 json string error ." + e.getMessage()); |