package com.example; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import java.io.IOException; import java.nio.file.Path; import java.util.List; public final class StudentReader { public static List read(Path path) throws IOException { return MAPPER.readValue(path.toFile(), new TypeReference>() {}); } private StudentReader() {} private static final ObjectMapper MAPPER = new ObjectMapper().registerModule(new JavaTimeModule()); }