79302922

Date: 2024-12-23 11:31:25
Score: 1
Natty:
Report link

Use TypeReference:

public <T> ResultPage<T> parseResultPage(String content, Class<T> resultType) throws IOException {
    TypeReference<ResultPage<T>> typeRef = new TypeReference<>() {};
    return new ObjectMapper().readValue(in, typeRef);
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: June