Gson Date 适配器
JsonDeserializer<Date> deser = new JsonDeserializer<Date>() { @Override public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { return json == null ? null : new Date(json.getAsLong()); } }; Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, deser).create(); return gson.fromJson(json , YOUROBJECT.class);