class ObjectMapperUtil {

    public Object convertToObject(String data, TypeReference c) {
        try {
            return objectMapper.readValue(data, c);
        } catch (IOException e) {
            throw new RuntimeException("JSON deserialization failed", e);
        }
    }

}