jcut - cut out selected portions of each JSON object in a file
version 0.005
jcut -o field_1 [-o field_2 ...] [--verbose] [file ...]
jcut(1) cuts out selected portions of each JSON record and writes them to standard output. Multiple output fields may be specified, one per -o flag.
You may read this utility's implementation in its entirety at
perldoc -m jcut
App::PipeFilter::JsonCut implements this utility, including the behavior of the -o flag.
The jsonpath(1) utility performs a similar function, but output fields are specified by JSON::Path expressions instead of simple field names. jsonpath(1) can therefore extract data from more complex JSON objects.
App::PipeFilter has top-level documentation including a table of contents for all the libraries and utilities included in the project.
JSON is relatively verbose compared to the whitespace-separated formats that UNIX tools usually deal with. It's often beneficial to jcut(1) the fields you need early in a pipeline chain and discard any extraneous data.
https://rt.cpan.org/Public/Dist/Display.html?Name=App-PipeFilter
https://github.com/rcaputo/app-pipefilter
jcut is Copyright 2011 by Rocco Caputo. All rights are reserved. jcut is released under the same terms as Perl itself.
To install App::PipeFilter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::PipeFilter
CPAN shell
perl -MCPAN -e shell install App::PipeFilter
For more information on module installation, please visit the detailed CPAN module installation guide.