FasterXML / FasterXML/jackson-dataformats-text
Use `CsvSchema.ColumnType.NUMBER` and such to coerce field values from plain `String`s
- 主要语言
- Java
- 星标
- 455
- 派生
- 164
- 平均合并
- 6 天 10 小时
- 30 天内合并 PR
- 2
描述
Current: https://github.com/FasterXML/jackson-dataformats-text/tree/master/csv
```
File csvFile = new File(fileName);
CsvMapper mapper = new CsvMapper();
CsvSchema schema =...
MappingIterator> it = mapper.readerFor(Map.class)
.with(schema)
.readValues(csvFile);
while (it.hasNext()) {
Map rowAsMap = it.next();
// access by column name, as defined in the header row...
}
```
Desired:
```
MappingIterator> it = mapper.readerFor(Map.class)
.with(schema)
.readValues(csvFile);
```
e.g., if the 1st column specified in `schema` is CsvSchema.ColumnType.NUMBER(can it be integer and floating), then the 1st column in the map should be number instead of string.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。