FasterXML / FasterXML/jackson-dataformats-text

`MappingIterator` returns `List` or `Map` depending on `CSVSchema.withHeader()`

オープン
#88 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
csv
主要言語
Java
スター
455
フォーク
164
平均マージ
6日 10時間
マージ済み PR(30日)
2

説明

If CSVSchema.withHeader == true i must do:

` final Map line = (Map) mappingIterator.nextValue();`

If CSVSchema.withHeader == false i must do:

` final List line = (List) mappingIterator.nextValue();`

My use-case is: I have only one Class in which i parse CSV and this class can be configured to read the csv with header or without header (boolean-flag). For me it would be better if the MappingIterator always returns the same result-type (either a list or a map). Its not necessary, but would make things easier for me because now i need to cast the type like above, which looks a bit unsafe and is marked as yellow-warning in Eclipse-IDE.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。