'Catalyst::Controller'; }
use CGI::Expand ();
use DBIx::Class::ResultClass::HashRefInflator;
use JSON::MaybeXS ();
use Test::Deep::NoTest('eq_deeply');
use MooseX::Types::Moose(':all');
use Moose::Ut
eUpdate;
use namespace::autoclean;
has '_json' => (
is => 'ro',
isa => JSON::MaybeXS::JSON(),
lazy_build => 1,
);
sub _build__json {
# no ->utf8 here because the requ
est params get decoded by Catalyst
return JSON::MaybeXS->new;
}
with 'Catalyst::Controller::DBIC::API::StoredResultSource',
'Catalyst::Controller::DBIC::API::StaticArguments';
with 'Catalyst
=> 'application/json',
'stash_key' => 'response',
'map' => {
'application/x-www-form-urlencoded' => 'JSON',
'application/json' => 'JSON',
},
);
s
has 'total_entries_arg' =>
( is => 'ro', isa => Str, default => 'totalcount' );
has 'use_json_boolean' => ( is => 'ro', isa => Bool, default => 0 );
has 'return_object' => ( is => 'ro', isa
onfiguration parameters such as where to find specific elements in the request
data and if to use JSON boolean types.
=head1 PUBLIC_ATTRIBUTES
=head2 create_requires create_allows update_requires up
nce 'total_entries' in the the request_data, defaults to
'totalcount'.
=head2 use_json_boolean
Controls whether JSON boolean types are used in the success parameter of the
response or if raw strings
=> 'application/json',
'stash_key' => 'response',
'map' => {
'application/x-www-form-urlencoded' => 'JSON',
'application/json' => 'JSON',
}
);
sub