package Text::ASCIITable::EasyTable;
use strict;
use warnings;
use Data::Dumper;
use JSON;
use List::Util qw(pairs);
use Scalar::Util qw(reftype);
use Text::ASCIITable;
use parent qw(Exporter);
ou
)
if !$options{json};
# return an array of hashes
my @json_data;
foreach my $row ( @{$data} ) {
my %hashed_row = map { $_ => shift @{$row} } @columns;
push @json_data, \%hashed_row
;
}
return JSON->new->pretty->encode( \@json_data );
}
########################################################################
sub _render_table {
##############################################