-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
csv2json issues #291
Comments
OK, fixed, and it will be available in the next release.
|
Great thank you, very much! I can confirm it works fine on MS Windows with version 0.31.0. A small note for the next version, although this is very rare in practice: |
Thanks, I'll add these later. |
Prerequisites
version: csvtk v0.30.0
Describe your issue
I have noticed four issues with the csv2json command.
command:
csvtk csv2json testdata.csv -o testdata.json
input file testdata.csv
:test
none
"Make America ""great"" again"
\nations
"This is a
MULTILINE
string"
actual output file testdata.json
:expected output file testdata.json
:Comments
:issue 1: I want "none" to be depicted literally and neither changed to "null" (no option) nor "" (empty string with option -b)
issue 2: In JSON, double quotes have to be escaped with a backslash (
\"
)issue 3: In JSON, backslashes have to be escaped with a backslash (
\\
)issue 4: In JSON, the line breaks of a CSV multiline cell have to be depicted as
\n
Thank you
Thank you very much for the great csvtk tool!
The text was updated successfully, but these errors were encountered: