Example JSON (note that the string has trailing spaces):
{ \"aNumber\": 0, \"aString\": \"string \" }
Ideally, the deserialised instance
com.fasterxml.jackson.dataformat
pom.xml
com.fasterxml.jackson.dataformat
jackson-dataformat-csv
2.5.3
CsvUtil.java
CsvSchema bootstrapSchema = CsvSchema.emptySchema().withHeader().sortedBy();
CsvMapper mapper = new CsvMapper();
mapper.enable(CsvParser.Feature.TRIM_SPACES);
InputStream inputStream = ResourceUtils.getURL(fileName).openStream();
MappingIterator readValues =
mapper.readerFor(type).with(bootstrapSchema).readValues(inputStream);