BuildAccessorsScalar(\@AS);
use Carp;
use Data::Dumper;
use Text::ParseWords;
use JSON::XS qw(encode_json decode_json);
use Tie::IxHash;
#
# Check given field is of nested kind:
#
# $self->is_nested
)}) {
print "$_\n" for @{$self->to_json($doc)};
}
$self->output->flush; # Flush output when processed
}
return 1;
}
sub to_json {
my $self = shift;
my ($doc) = @_;
$doc ];
my @json = ();
for (@$doc) {
my $docs = $self->order($_) or next;
for my $doc (@$docs) {
my $json;
eval {
$json = encode_json($doc);
elf->unflatten($input) or return;
my $json = $self->to_json($unflatten->[0]);
$json =~ s{(?<!\\)'}{\\'}g;
my $new = {};
$new->{data} = `echo '$json' | $command`;
$self->output->add($ne
for (@$results) {
next if m{.\@category.\s*:\s*.none.};
my $docs = $self->from_json($_);
$docs = $self->flatten($docs);
$self->output->add($docs);
}
};
f8;
use File::Temp qw(tempfile);
use File::Slurp qw(read_file);
use Mojo::URL;
use JSON::XS qw(encode_json decode_json);
use Mojo::UserAgent;
use Mojo::Util qw(b64_encode url_escape);
#
# Common func
'.$apikey,
'X-Api-Key' => $apikey, # Ready for APIv3
'Content-Type' => 'application/json',
'Accept' => '*/*',
};
if (defined($ct)) {
$headers->{'Content-Type'} = $ct;
}
sub get_total ($self, $json) {
my $total = $json->{total};
return defined($total) && $total ? $total : 0;
}
sub get_maxpage ($self, $json) {
my $maxpage = $json->{max_page};
return de