|
@@ -2,6 +2,7 @@ package com.tzld.piaoquan.recommend.server.util;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.reflect.TypeToken;
|
|
|
+import com.google.gson.Gson;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
@@ -14,7 +15,7 @@ public class JSONUtils {
|
|
|
return "";
|
|
|
}
|
|
|
try {
|
|
|
- return JSONObject.toJSONString(obj);
|
|
|
+ return new Gson().toJson(obj);
|
|
|
} catch (Exception e) {
|
|
|
log.error("toJson exception", e);
|
|
|
return "";
|