Java API to make an object from a CSV file [closed]

JSefa allow you to annotate Java classes that can be used in a serialization and de-serialization process. The tutorial demonstrates how this works with the CsvIOFactory class.

(From the tutorial) Annotating a bean is as simple as specifying the locations of the items in the list of values, and if necessary, you’ll need to specify the conversion format:

@CsvDataType()
public class Person {
    @CsvField(pos = 1)
    String name;

    @CsvField(pos = 2, format = "dd.MM.yyyy")
    Date   birthDate;
}

Leave a Comment