@SuppressWarnings("unchecked")
public <T> Response<T> fromJSON(String response, Response<T> target) {
try {
response = StandardizationUtil.getJSONStandardizer(target).normalize(response);
} catch (Exception e) {
throw new SerializationException(e);
}
try {
Response<T> fromJson = gson.fromJson(response, target.getClass());
if (fromJson == null) {
fromJson = target;
}
return fromJson;
} catch (JsonSyntaxException jse) {
throw new SerializationException(jse);
}
}