时间格式化: Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd hh:mm:ss").create();
一些特殊的== > & 会被转成/003u
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd hh:mm:ss").disableHtmlEscaping().create();
解析泛型
if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String json = EntityUtils.toString(response.getEntity(), "UTF-8");
Type type = new TypeToken<BaseContentRespVo<String>>() {}.getType();
final BaseContentRespVo<String> bcrv = new Gson().fromJson(json, type);
}