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:
John Kerl 2023-11-11 18:58:49 -05:00 committed by GitHub
parent f2a9ae5ca4
commit 5b6a1d4713
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 90 additions and 54 deletions

View file

@ -1,2 +1,2 @@
{"abcdef ghi": "jkl\nmno\rpqr\tstu\"vw\\xyz"}
{"abcdef ghi": "jkl\nmno\rpqr\tstu\"vw\\\\xyz"}
{"abc\bdef\fghi": "jkl\nmno\rpqr\tstu\"vw\\xyz"}
{"abc\bdef\fghi": "jkl\nmno\rpqr\tstu\"vw\\\\xyz"}

View file

@ -0,0 +1 @@
mlr --j2l --from test/input/quoted-keys.json cat

View file

View file

@ -0,0 +1 @@
{"a\"b\"c": "d\"e\"f"}

View file

@ -0,0 +1 @@
mlr --l2j --from test/input/quoted-keys.json cat

View file

View file

@ -0,0 +1,5 @@
[
{
"a\"b\"c": "d\"e\"f"
}
]

View file

@ -0,0 +1 @@
{"a\"b\"c":"d\"e\"f"}