full => 1, # return all available information
);
Returns a hashref directly from the JSON response of the xsearch API
described at L<http://librishelp.libris.kb.se/help/xsearch_eng.jsp?op
> 200, # max. number of results
start => 1 + 200 * ($page - 1),
format => 'json',
);
$q{format_level} = 'full' if $opts{full};
my $url = Mojo::URL->new('http://libri
;
$res->json;
}
sub search {
my ($self, %opts) = @_;
my $json = $self->direct_search(%opts);
my @ids = map { (split '/', $_->{identifier})[-1] }
@{ $json->{xsearch}
$object) = $self->_prepare(@_);
return 0 unless defined $object && !ref $object;
# From JSON::PP
my $flags = B::svref_2object(\$object)->FLAGS;
my $is_number = $flags & (B::SVp_IOK |
se
L<List::Util> and L<List::MoreUtils> modules.
Numeric/String detection is done the same way L<JSON::PP> does it: by using
L<B> hacks.
Boolean values are implemented as overloaded methods, that re
{
$WebService::Diffbot::VERSION = '0.003';
}
use Moo;
use namespace::clean;
use JSON qw( decode_json encode_json );
use LWP::UserAgent;
has api_url => ( is => 'ro', default => sub { 'http://api.d
serAgent->new->get($uri);
die $response if !$response->is_success;
my $content = decode_json $response->decoded_content;
die $content->{error} if $content->{error};
print STDERR $co
rp;
use Data::Dumper;
use JSON;
use Readonly;
use HTTP::Request;
use LWP::UserAgent;
our $VERSION = '0.05';
Readonly my $BASE_URL => "http://jobs.github.com/positions.json";
type 'TrueFalse' => wh
s available on https://jobs.github.com/api)
use strict;
use warnings;
use GitHub::Jobs;
use JSON::XS;
use POSIX;
$|++;
my $query = 'software';
my $count = 0;
my $pagination = 0;
;
my $str = GitHub::Jobs->new( description => $query, page => $page );
return JSON::XS::decode_json( $str->search() );
}
sub decode {
foreach my $items ( @{ initial($pagination) }
'cpu', 'rss' ) {
$result->{ $metric } = $rrd->find_rrds( $dir );
}
$self->render( json => $result );
};
app->start;
# each route can perform overrides from the defaults with this met
IO::Pool::Redis;
use strict;
use warnings;
use base 'PocketIO::Pool';
use AnyEvent::Redis;
use JSON;
use Scalar::Util qw(blessed);
use PocketIO::Connection;
use constant DEBUG => $ENV{POCKETIO_PO
self->{channel} => sub {
my ($message, $channel) = @_;
$message = decode_json($message);
my $invoker_id = $message->{invoker};
foreach my $conn ($sel
. $id . "'\n";
$cb->() if $cb;
}
sub send {
my $self = shift;
my $message = encode_json({message => "$_[0]"});
$self->{pub}->publish($self->{channel}, $message);
return $self;
egin MetaPOD::JSON v1.1.0
{
"namespace":"Net::Minecraft::Login",
"inherits":"Moo::Object",
"does":"Net::Minecraft::Role::HTTP",
"interface":"class"
}
=end MetaPOD::JSON
=head1 AUTH
if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) {
my $prereqs = parse_meta_json()->effective_prereqs;
my $reqs = $prereqs->requirements_for( 'develop', 'requires' );
my
VERSION
version 0.002000
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Net::Minecraft::Role::LoginResult",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpan.
taPOD::JSON v1.1.0
{
"namespace":"Net::Minecraft::LoginFailure",
"inherits":"Moo::Object",
"does":"Net::Minecraft::Role::LoginResult",
"interface":"class"
}
=end MetaPOD::JSON
=hea
aders>
=head2 C<http_engine>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Net::Minecraft::Role::HTTP",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
taPOD::JSON v1.1.0
{
"namespace":"Net::Minecraft::LoginResult",
"inherits":"Moo::Object",
"does":"Net::Minecraft::Role::LoginResult",
"interface":"class"
}
=end MetaPOD::JSON
=head
= cwd();
chdir '/tmp/cpan-fixes';
cpanm(@params);
chdir $cwd;
}
sub parse_meta_json {
$_[0] ||= 'META.json';
require CPAN::Meta;
return CPAN::Meta->load_file( $_[0] );
}
sub import {
m
ixes;
$caller_stash->{cpanm_fix} = *cpanm_fix;
$caller_stash->{parse_meta_json} = *parse_meta_json;
$caller_stash->{capture_stdout} = *capture_stdout;
$caller_stash->{deploy_st
use different session data.
package MyJediApp;
use Jedi::App;
use Jedi::Plugin::Session;
use JSON;
sub jedi_app {
my ($app) = @_;
$app->get('/set_session', sub {
my ($app, $request, $re
$request->session_get;
$response->status(200);
$response->body(defined $session ? encode_json($session) : 'session not defined !');
})
}
1;
=head1 LIMITATION
The session is keep in memo
ex/;
use Data::UUID;
use Path::Class;
use Jedi::Plugin::Auth::DB;
use DBIx::Class::Migration;
use JSON;
my $uuid_generator = Data::UUID->new;
# connect / create / prepare db
sub _prepare_database {
return {
user => $user->user,
uuid => $user->uuid,
info => decode_json( $user->info ),
roles => [ map { $_->name } $user->roles->all() ],
};
}
use Moo::Rol
),
uuid => $uuid_generator->create_str(),
info => encode_json( $params{info} ),
}
);
1;
};
$user->set_roles( [ map { {
package CGI::Lazy::Widget::Controller;
use strict;
use JSON;
use JavaScript::Minifier qw(minify);
use CGI::Lazy::Globals;
use base qw(CGI::Lazy::Widget);
#------------------------------------------
dname} = $value;
}
}
my $jscontrollername = $widgetID."Controller";
my $selectObject = to_json([map {{name => $_->{name}, required => $_->{required}}} @{$self->controls}]);
my $javascript =
package CGI::Lazy::Widget::Composite;
use strict;
use JSON;
use CGI::Lazy::Globals;
use base qw(CGI::Lazy::Widget);
# for new composite types need the following: ajaxSelect<type> and dbwrite<type
axSelectParentChild {
my $self = shift;
my %args = @_;
my $incoming = $args{incoming} || from_json(($self->q->param('POSTDATA') || $self->q->param('keywords') || $self->q->param('XForms:Model')));
ctSelectableDataset {
my $self = shift;
my %args = @_;
my $incoming = $args{incoming} || from_json(($self->q->param('POSTDATA') || $self->q->param('keywords') || $self->q->param('XForms:Model')));
package CGI::Lazy::Widget;
use strict;
use JSON;
use Tie::IxHash;
use CGI::Lazy::Globals;
use CGI::Lazy::Widget::Dataset;
use CGI::Lazy::Widget::DomLoader;
use CGI::Lazy::Widget::Composite;
use CGI:
$validator->{$_->widgetID} = $_->validator for @widgetlist;
my $json = to_json($validator);
return '{"validator" : '.$json.', "html" : "'.$outgoingdata .'"}';
}
#------------------------
foreach my $object (keys %{$self->vars->{objects};}) {
$objectJs .= "var $object = JSON.parse('".to_json($self->vars->{objects}->{$object})."');\n";
}
$objectJs = $self->q->jsw
package CGI::Lazy::Widget::DomLoader;
use strict;
use base qw(CGI::Lazy::Widget);
use JSON;
#----------------------------------------------------------------------------------------
sub new {
my $
foreach my $rawvar (keys %{$self->vars->{raw};}) {
$rawObjectJs .= "var $rawvar = JSON.parse('".to_json($self->vars->{raw}->{$rawvar})."');\n";
}
$rawObjectJs = $self->q->jswr
yValidation;
{
$HTML::FormFu::Role::JQueryValidation::VERSION = '1.01';
}
use Moose::Role;
use JSON::Any;
use Scalar::Util qw( refaddr reftype );
sub jquery_validation_profile {
my ( $self ) =
}
}
}
return \%js;
}
sub jquery_validation_json {
my ( $self ) = @_;
return JSON::Any->objToJson( $self->jquery_validation_profile );
}
sub jquery_validation_errors
y.validate.min.js" />
<script>
$("#form").validate( [% form.jquery_validation_json %] );
</script>
</body>
</html>
=head1 DESCRIPTION
Experimental support for cli