package App::AutoCRUD::View::Json;
use 5.010;
use Moose;
extends 'App::AutoCRUD::View';
use JSON::MaybeXS;
use namespace::clean -except => 'meta';
has 'json_args' => ( is => 'bare', isa =>
encode output
my $json_maker = JSON::MaybeXS->new(%{$self->{json_args}});
my $output = $json_maker->encode($data);
return [200, ['Content-type' => 'application/json; charset=UTF-8'],
:AutoCRUD::Controller';
use SQL::Abstract::More;
use Clone qw/clone/;
use JSON;
use URI;
use namespace::clean -except => 'meta';
#---------------------------------------
ntroller';
use SQL::Abstract::More 1.27;
use List::MoreUtils qw/mesh firstval/;
use JSON::MaybeXS ();
use URI;
use namespace::clean -except => 'meta';
#---------------------------
= 1 foreach @cols;
my $data = $self->descr($table);
$data->{init_form} = $self->_encode_json($req_data);
return $data;
}
}
sub update {
my ($self, $table) = @_;
$self->
lit qr[/], $noupd;
}
# initial values for the form
$data->{init_form} = $self->_encode_json($req_data);
return $data;
}
sub delete {
my ($self, $table) = @_;
$self->_chec
thout investing into a full-fledged custom application.
=item *
Data export in Excel, YAML, JSON, XML formats
=item *
Extensibility through inheritance
=back
This application is al
presentation view
=item xlsx
Export to Excel
=item yaml
L<YAML> format
=item json
L<JSON> format
=item xml
C<XML> format
=back
=item *
Flag for total page count (this