Distinguish between JSON and JSON Lines formats (#844)

* Draw a distinction between JSON and JSON Lines formats

* Add JSON Lines to on-line help example

* Have JSON format default to --jlistwrap and --jvstack

* Update test cases for --jlistwrap output for JSON output format

* Have JSON format default to --jlistwrap and --jvstack for --{X}2j as well

* Make --jlistwrap / --jvstack as legacy flags, since now --json and --jsonl

* Add --c2l, --l2c, etc. command-line flags

* docmods for JSON Lines

* Update regression-test cases for JSON / JSON Lines distinction
This commit is contained in:
John Kerl 2022-01-09 11:11:54 -05:00 committed by GitHub
parent 7143288689
commit da91878939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
438 changed files with 2538 additions and 1517 deletions

View file

@ -106,6 +106,8 @@ However, in Miller 6 it has optional use for map traversal. Example:
<pre class="pre-non-highlight-in-pair">
bar.baz
bar.baz
[
]
</pre>
This also works on the left-hand sides of assignment statements:
@ -116,6 +118,7 @@ This also works on the left-hand sides of assignment statements:
<b>'</b>
</pre>
<pre class="pre-non-highlight-in-pair">
[
{
"hostname": "localhost",
"pid": 12345,
@ -137,6 +140,7 @@ This also works on the left-hand sides of assignment statements:
}
}
}
]
</pre>
A few caveats:
@ -150,6 +154,8 @@ A few caveats:
</pre>
<pre class="pre-non-highlight-in-pair">
6989
[
]
</pre>
* However (awkwardly), if you want to use `.` for map-traversal as well as string-concatenation in the same statement, you'll need to insert parentheses, as the default associativity is left-to-right:
@ -161,6 +167,8 @@ A few caveats:
</pre>
<pre class="pre-non-highlight-in-pair">
(error)
[
]
</pre>
<pre class="pre-highlight-in-pair">
@ -170,4 +178,6 @@ A few caveats:
</pre>
<pre class="pre-non-highlight-in-pair">
GET -- api/check
[
]
</pre>