jl - JSON in JSON log viewer
The jl command allows you to recursively decode JSON in JSON string
$ echo '{"foo":"{\"bar\":\"{\\\"baz\\\":123}\"}"}' | jl { "foo" : { "bar" : { "baz" : 123 } } }
The number of recursive depth. (default: 10)
If set no-pretty option, then output JSON is not prettify. (default: false, Do prettify)
no-pretty
If set x option, then JSON values are split as array by [\t\n\r] before recursively decoding.
x
This option is useful for below case:
$ echo '{"message":"[05/09/2019 23:51:51]\t[warn]\t{\"foo\":\"bar\"}"}' | jl -x { "message" : [ "[05/09/2019 23:51:51]", "[warn]", { "foo" : "bar" } ] }
If set xx option, then JSON values are split as array by each parenthesis before recursively decoding after x option parsing.
xx
$ echo '{"message":"[05/09/2019 23:51:51] (warn) <server>\t{\"foo\":\"bar\"}"}' | jl -x { "message" : [ "[05/09/2019 23:51:51]", "(warn)", "<server>", { "foo" : "bar" } ] }
Dai Okabayashi <bayashi@cpan.org>
App::jl
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install App::jl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::jl
CPAN shell
perl -MCPAN -e shell install App::jl
For more information on module installation, please visit the detailed CPAN module installation guide.