}
sub psgi {
my ($self, $result) = @_;
my $json = JSON->new->encode( $result );
return [ 200, [ "Content-Type" => $self->type ], [ $json ] ];
}
1;
__END__
=pod
=encoding UTF-8
=head1
JSONP;
use Plack::Middleware::Static;
use Plack::App::unAPI qw(0.3);
use File::ShareDir qw(dist_dir);
use Plack::Util;
use Carp qw(croak);
use Scalar::Util qw(blessed reftype);
use Try::Tiny;
use JSON
$self->query(@_) } ), $f->type ];
my $app = unAPI( %formats );
$app = Plack::Middleware::JSONP->wrap($app);
if ($self->{Stylesheet}) {
$app = Plack::Middleware::Static->wrap( $ap