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"
}
]
}
AUTHOR
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.