public <T> void getJsonObject(String res, RequestCallBack<T> callBack) {
T result;
if (res != null) {
ObjectMapper mapper = new ObjectMapper();
try {
result = mapper.readValue(res, new TypeReference<T>() {});
callBack.onSuccess(result);
} catch (IOException e) {
e.printStackTrace();
}
}
}
it can't transmit T
to the mapper the result is not what i want, what should I do?