f',
},
row_as => {
schema => ['str*', in=>['json-one-line', 'json-card']], # XXX yaml, csv, tsv, ...
default => 'json-one-line',
},
);
our %args_connect_dbi = (
dsn1 =
election'],
},
);
sub __json_encode {
state $json = do {
require JSON::MaybeXS;
JSON::MaybeXS->new->allow_nonref(1)->canonical(1);
};
$json->encode(shift);
}
sub _get
if ($self->{row_as} eq 'json-one-line') {
my $res = __json_encode($row);
$res .= "\n" unless $res =~ /\R\z/;
$res;
} elsif ($self->{row_as} eq 'json-card') {
my $re