The Jackson data binding documentation indicates that Jackson supports deserialising \"Arrays of all supported types\" but I can\'t figure out the exact syntax for this.
I was unable to use this answer because my linter won't allow unchecked casts.
Here is an alternative you can use. I feel it is actually a cleaner solution.
public List parseJsonArray(String json, Class clazz) throws JsonProcessingException {
var tree = objectMapper.readTree(json);
var list = new ArrayList();
for (JsonNode jsonNode : tree) {
list.add(objectMapper.treeToValue(jsonNode, clazz));
}
return list;
}