Invalid time zone indicator ‘ ‘

GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
    public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
        return new Date(json.getAsJsonPrimitive().getAsLong());
    }
});
Gson gson = builder.create();

 

posted @ 2024-11-04 15:09  八英里  阅读(10)  评论(0编辑  收藏  举报