Apply the CsvReader.java API to the commands csv2html, csv2json, csv2xml in Transformer.java
Replaced jackson CsvMapper with AquaCsvReader in Transformer.java.
The output generated by csv2html/json/xml commands is slightly different on empty input with -N option before and after the change.
Try these commands before and after this fix:
(1) echo | csv2json
(2) echo | csv2json -N
(3) echo > tmp.out
(4) cat tmp.out | csv2json
(5) cat tmp.out | csv2json -N
jackson CsvMapper interprets (2) and (5) as an input with one row of data, while AquaCsvReader will not. See attached screenshot for more info.
Discussed with Fung and he explained the replacement of jackson CsvMapper. Tested out a few options in 12.0.1-2.
Discussed with Fung and he explained the replacement of jackson CsvMapper. Tested out a few options in 12.0.1-2.
Issue #7808 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build trunk/29851 |
No time estimate |
1 issue link |
relates to #7909
Issue #7909\csv2html -s on binary file |
Replaced jackson CsvMapper with AquaCsvReader in Transformer.java.
The output generated by csv2html/json/xml commands is slightly different on empty input with -N option before and after the change.
Try these commands before and after this fix:
(1) echo | csv2json
(2) echo | csv2json -N
(3) echo > tmp.out
(4) cat tmp.out | csv2json
(5) cat tmp.out | csv2json -N
jackson CsvMapper interprets (2) and (5) as an input with one row of data, while AquaCsvReader will not. See attached screenshot for more info.