se Moo;
use Text::MarkdownTable;
use IO::Handle::Util ();
use IO::File;
use JSON::XS ();
with 'Catmandu::Exporter';
# JSON Table Schema
has schema => (
is => 'ro',
coerce => sub {
my
chema, "r");
die "failed to load JSON Table Schema from $schema" unless $fh;
local $/;
$schema = JSON::XS::decode_json(<$fh>);
}
$schema;
}
);
ne client:
echo '{"one":"my","two":"table"} {"one":"is","two":"nice"}' | \
catmandu convert JSON --multiline 1 to Table
| one | two |
|-----|-------|
| my | table |
| is | nice |