public static <T> List<T> loadJsonValues(File json, Class<T> clazz) throws IOException {
        List<T> answer = new ArrayList<>();
        if (json.exists() && json.isFile()) {
            MappingIterator<T> iter = objectMapper.readerFor(clazz).readValues(json);
            while (iter.hasNext()) {
                answer.add(iter.next());
            }
        }
        return answer;
    }
public static < T > List < T > loadJsonValues ( File json , Class < T > clazz ) throws IOException { List < T > answer = new ArrayList < > ( ) ; if ( json . exists ( ) && json . isFile ( ) ) { MappingIterator < T > iter = objectMapper . readerFor ( clazz ) . readValues ( json ) ; while ( iter . hasNext ( ) ) { answer . add ( iter . next ( ) ) ; } } return answer ; }
Saves the json object to the given file