mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
JSONL output does not properly handle keys with quotes (#1425)
* mlr --l2j, --j2l * make dev for previous commit * fix #1424 * unit-test cases * iterate
This commit is contained in:
parent
f2a9ae5ca4
commit
5b6a1d4713
17 changed files with 90 additions and 54 deletions
|
|
@ -1,2 +1,2 @@
|
|||
{"abcdefghi": "jkl\nmno\rpqr\tstu\"vw\\xyz"}
|
||||
{"abcdefghi": "jkl\nmno\rpqr\tstu\"vw\\\\xyz"}
|
||||
{"abc\bdef\fghi": "jkl\nmno\rpqr\tstu\"vw\\xyz"}
|
||||
{"abc\bdef\fghi": "jkl\nmno\rpqr\tstu\"vw\\\\xyz"}
|
||||
|
|
|
|||
1
test/cases/io-jsonl-io/0036/cmd
Normal file
1
test/cases/io-jsonl-io/0036/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --j2l --from test/input/quoted-keys.json cat
|
||||
0
test/cases/io-jsonl-io/0036/experr
Normal file
0
test/cases/io-jsonl-io/0036/experr
Normal file
1
test/cases/io-jsonl-io/0036/expout
Normal file
1
test/cases/io-jsonl-io/0036/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"a\"b\"c": "d\"e\"f"}
|
||||
1
test/cases/io-jsonl-io/0037/cmd
Normal file
1
test/cases/io-jsonl-io/0037/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --l2j --from test/input/quoted-keys.json cat
|
||||
0
test/cases/io-jsonl-io/0037/experr
Normal file
0
test/cases/io-jsonl-io/0037/experr
Normal file
5
test/cases/io-jsonl-io/0037/expout
Normal file
5
test/cases/io-jsonl-io/0037/expout
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
{
|
||||
"a\"b\"c": "d\"e\"f"
|
||||
}
|
||||
]
|
||||
1
test/input/quoted-keys.json
Normal file
1
test/input/quoted-keys.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"a\"b\"c":"d\"e\"f"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue