Closed
Description
Is your feature request related to a problem? Please describe.
The situation now is that without this overloaded method, I need to write extra code to achieve the result I want.
ObjectMapper mapper = new ObjectMapper();
ArrayNode node = mapper.createArrayNode();
node.add("123").add("456");
JavaType javaType = mapper.constructType(new TypeReference<List<String>>() {});
try {
mapper.treeToValue(node, javaType);
} catch(Exception e) {
e.printStackTrace();
}
Describe the solution you'd like
Could you provide this method to simplify my code?
Like the code below.
ObjectMapper mapper = new ObjectMapper();
ArrayNode node = mapper.createArrayNode();
node.add("123").add("456");
try {
mapper.treeToValue(node, new TypeReference<List<String>>() {});
} catch(Exception e) {
e.printStackTrace();
}
Usage example
No response
Additional context
No response