The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

jl - JSON in JSON log viewer

SYNOPSIS

The jl command allows you to recursively decode JSON in JSON string

    $ echo '{"foo":"{\"bar\":\"{\\\"baz\\\":123}\"}"}' | jl
    {
       "foo" : {
          "bar" : {
             "baz" : 123
          }
       }
    }

OPTIONS

depth

The number of recursive depth. (default: 10)

no-pretty

If set no-pretty option, then output JSON is not prettify. (default: false, Do prettify)

x

If set x option, then JSON values are split as array by [\t\n\r] before recursively decoding.

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"
          }
       ]
    }

xx

If set xx option, then JSON values are split as array by each parenthesis before recursively decoding after x option parsing.

This option is useful for below case:

    $ 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"
          }
       ]
    }

AUTHOR

Dai Okabayashi <bayashi@cpan.org>

SEE ALSO

App::jl

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.