Closed pavelhoral closed 2 years ago
Thanks for reporting this @pavelhoral and apologies that it wasn't working as anticipated for your use case. I've confirmed I can reproduce this issue. I suspect it's a bug with the CSV string parser logic where something isn't quite getting stored properly. I should have some time to walk through this closer this coming weekend, so I'll keep you posted as to when I have a fix published on NPM.
Thanks again for reporting this @pavelhoral. I'll be pushing version 3.15.1
to NPM shortly which fixes the issue you identified.
This bug still exists in the latest 4.1.0 version. From this test file I am getting two incomplete rows test.csv
I have created new issue https://github.com/mrodrig/json-2-csv/issues/240 because of no answer
Hi @symbianm. The bug reported in this issue is not still present in 4.1.0
. As tested with the latest release, the output for the CSV sample provided with this issue returns the following, which is correct:
[
{
"first": "hello\n",
"second": "world"
}
]
I will now switch over to #240 to look into the separate issue you're reporting.
Background Information
master
irrelevant
The issue I'm reporting is with:
I have...
Expected Behavior
Quoted values split across multiple lines should be correctly parsed.
Actual Behavior
The parser behaves incorrectly when the end quote is at the start of a new line.
Data Sample
CSV:
This is being parsed as:
I did try to fix it but the parser makes almost no sense to me so I am creating this issue and going to find another library or write my own parser :). Good luck.