Closed GoogleCodeExporter closed 9 years ago
You can register a TypeAdapterFactory which forces Serializable types to be
deserialized as Objects:
@Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
if (Serializable.class.equals(type.getRawType())) {
return (TypeAdapter<T>) gson.getAdapter(Object.class);
}
return null;
}
Original comment by j...@squareup.com
on 9 Aug 2014 at 6:00
Original issue reported on code.google.com by
bors...@gmail.com
on 3 Dec 2013 at 1:07