FasterXML / FasterXML/jackson-dataformats-text
CSV Schema map headers to Pojo
- Vorherrschende Sprache
- Java
- Sterne
- 455
- Forks
- 164
- Ø Merge
- 6 T. 10 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
Hi,
There is a use case where we know the CSV column names but not the order.
It would be great if there was a way to map headers in the CSV to POJO properties.
Something like:
```
Map csvHeaders = new HashMap();
csvHeaders.put("headerX", "propertyX");
csvHeaders.put("headerY", "propertyY");
CsvSchema bootstrapSchema = CsvSchema.emptySchema().withHeaderMap(csvHeaders);
...
```
Possibly with an option to either ignore extra columns or throw an error if there are missing columns.
Does anyone know if this is possible/likely?
Thanks for a great library.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.