-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
csv2json: fix values with double quotes and new line symbols. #291
- Loading branch information
1 parent
6e4f5c5
commit 4818152
Showing
6 changed files
with
110 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,7 +178,6 @@ Notes: | |
|
||
b.GlyphStyle.Color = plotutil.Color(j) | ||
b.GlyphStyle.Radius = pointSize | ||
|
||
j++ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,7 +124,7 @@ Usage | |
```text | ||
csvtk -- a cross-platform, efficient and practical CSV/TSV toolkit | ||
Version: 0.30.0 | ||
Version: 0.31.0 | ||
Author: Wei Shen <[email protected]> | ||
|
@@ -1088,7 +1088,34 @@ Examples | |
"ID": "1e-3", | ||
"room": "2", | ||
"name": "", | ||
"status": "" | ||
"status": "N/A" | ||
} | ||
] | ||
|
||
- values with `"`, `\`, `\n`. | ||
|
||
$ cat testdata/data4json2.csv | ||
test | ||
none | ||
"Make America ""great"" again" | ||
\nations | ||
"This is a | ||
MULTILINE | ||
string" | ||
|
||
$ csvtk csv2json testdata/data4json2.csv | ||
[ | ||
{ | ||
"test": null | ||
}, | ||
{ | ||
"test": "Make America \"great\" again" | ||
}, | ||
{ | ||
"test": "\\nations" | ||
}, | ||
{ | ||
"test": "This is a\nMULTILINE\nstring" | ||
} | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
test | ||
none | ||
"Make America ""great"" again" | ||
\nations | ||
"This is a | ||
MULTILINE | ||
string" |