2222< section >
2323< h1 > jsoncols</ h1 >
2424
25- < h2 > USAGE</ h2 >
25+ < h2 > USAGE: </ h2 >
2626
2727< pre > < code > jsoncols [OPTIONS] [EXPRESSION] [INPUT_FILENAME] [OUTPUT_FILENAME]
2828</ code > </ pre >
2929
3030< h2 > SYSNOPSIS</ h2 >
3131
32- < p > jsoncols provides for both interactive exploration of JSON structures like jid
33- and command line scripting flexibility for data extraction into delimited
34- columns. This is helpful in flattening content extracted from JSON blobs.
35- The default delimiter for each value extracted is a comma. This can be
36- overridden with an option.</ p >
32+ < p > jsoncols provides scripting flexibility for data extraction from JSON data
33+ returning the results in columns. This is helpful in flattening content
34+ extracted from JSON blobs. The default delimiter for each value
35+ extracted is a comma. This can be overridden with an option.</ p >
3736
3837< ul >
3938< li > EXPRESSION can be an empty stirng or dot notation for an object’s path</ li >
@@ -53,15 +52,18 @@ <h2>SYSNOPSIS</h2>
5352
5453< h2 > OPTIONS</ h2 >
5554
56- < pre > < code > -d set the delimiter for multi-field output
57- -h display help
58- -i read JSON from a file
59- -input read JSON from a file
60- -l display license
61- -m display output in monochrome
62- -r run interactively
63- -repl run interactively
64- -v display version
55+ < pre > < code > -d set the delimiter for multi-field output
56+ -h display help
57+ -i input filename
58+ -input input filename
59+ -l display license
60+ -m display output in monochrome
61+ -o output filename
62+ -output output filename
63+ -permissive suppress error messages
64+ -r run interactively
65+ -repl run interactively
66+ -v display version
6567</ code > </ pre >
6668
6769< h2 > EXAMPLES</ h2 >
@@ -73,7 +75,7 @@ <h2>EXAMPLES</h2>
7375
7476< p > Getting just the name could be done with</ p >
7577
76- < pre > < code > jsoncols .name myblob.json
78+ < pre > < code class =" language-shell " > jsoncols -i myblob.json .name
7779</ code > </ pre >
7880
7981< p > This would yeild</ p >
@@ -85,14 +87,26 @@ <h2>EXAMPLES</h2>
8587easy as listing each field in the expression inside a
8688space delimited string.</ p >
8789
88- < pre > < code > jsoncols -d\| " .name .age" myblob.json
90+ < pre > < code class =" language-shell " > jsoncols -i myblob.json - d\| .name .age
8991</ code > </ pre >
9092
9193< p > This would yeild</ p >
9294
9395< pre > < code > "Doe, Jane"|42
9496</ code > </ pre >
9597
98+ < p > You can also pipe JSON data in.</ p >
99+
100+ < pre > < code class ="language-shell "> cat myblob.json | jsoncols .name .email .age
101+ </ code > </ pre >
102+
103+ < p > Would yield</ p >
104+
105+ < pre > < code > "Doe, Jane",
[email protected] ,42
106+ </ code > </ pre >
107+
108+ < p > jsoncols v0.0.9</ p >
109+
96110</ section >
97111
98112< footer >
0 commit comments