mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.3k stars 1.14k forks source link

JSON to CSV - LineBreaks in strings #1033

Closed sschneider-ihre-pvs closed 7 months ago

sschneider-ihre-pvs commented 7 months ago

It seems that having linebreaks in strings will add linebreaks in csv as well

[
    {
        "Column 1": "1-1\n2-2",
        "Column 2": "1-2",
        "Column 3": "1-3",
        "Column 4": "1-4"
    }
]

this will be turned into

"1-1
2-2""1-2""1-3""1-4"
pokoli commented 7 months ago

I do not see any problem on that. If you have a newline in your text of course it will be rendered when printing.