|
@@ -3,6 +3,9 @@ package com.persagy.dmp.starter.alarm.util;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @description:
|
|
|
* @author: lixing
|
|
@@ -17,4 +20,12 @@ public class StringUtil {
|
|
|
}
|
|
|
return t.newInstance();
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("a", "1");
|
|
|
+ map.put("b", "2");
|
|
|
+
|
|
|
+ JSONObject obj = (JSONObject) JSONObject.toJSON(map);
|
|
|
+ }
|
|
|
}
|