81,092
社区成员
发帖
与我相关
我的任务
分享
public static String map2JsonStr(Map map, String datePattern) {
String ret = "";
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor(datePattern));
JSONObject jObj = new JSONObject();
jObj.putAll(map, jsonConfig);
ret = jObj.toString();
return ret;
}