import java.io.File; import java.io.IOException; import java.util.ArrayList; import com.fasterxml.jackson.core.exc.StreamReadException; import com.fasterxml.jackson.databind.DatabindException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.type.CollectionType; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; public class Conv { public void conv() { try { tryConv(); }catch(StreamReadException e) { System.err.println("Hiba! A folyam olvasása sikertelen!"); }catch(DatabindException e) { System.err.println("Hiba! A csatolás sikertelen!"); System.err.println(e.getMessage()); }catch(IOException e) { System.err.println("Hiba! A beolvasás sikertelen!"); } } public void tryConv() throws IOException { ObjectMapper om = new ObjectMapper(); om.registerModule(new JavaTimeModule()); om.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); CollectionType ct = om.getTypeFactory() .constructCollectionType(ArrayList.class, Employee.class); ArrayList empList = om.readValue(new File("emp.json"), ct); System.out.println(empList.get(0).birth.date); } }