android Gson 默认double 转 int
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").registerTypeAdapter(Double.class, new JsonSerializer<Double>() { @Override public JsonElement serialize(Double src, Type typeOfSrc, JsonSerializationContext context) { if (src == src.longValue()) return new JsonPrimitive(src.longValue()); return new JsonPrimitive(src); } }).create();