I have a class that accept a function Function<ByteBuffer, T> deserialize as a constructor argument.
I want to create a function which converts JSON into a list of objects.
Here's what I am trying to do:
public Function<ByteBuffer, List<MyObject>> deserialize(
final ObjectMapper objectMapper) {
return objectMapper.readValue(??, new TypeReference<List<MyObject>>(){});
}
Obviously the syntax is wrong here. How can I fix this?