fastjson中指定日期格式:
String json= JSONObject.toJSONStringWithDateFormat(Obj,"yyyy-MM-dd HH:mm:ss"));
Gson中指定日期格式:
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setDateFormat("yyyy-MM-dd HH:mm:ss");
Gson gson = gsonBuilder.create();
//直接序列化成对象
HttpMessage httpMessage = gson.fromJson(contetnEle, HttpMessage .class);