Group
Extension

Matches 35359

WWW-StopForumSpam ( P/PH/PHIPSTER/WWW-StopForumSpam-0.02.tar.gz, PHIPSTER, 2014; MetaCPAN )
WWW-StopForumSpam/lib/WWW/StopForumSpam.pm ( view source; MetaCPAN )
croak);
use URI::Escape;
use Digest::MD5 qw(md5_hex);
use Socket;
use WWW::Curl::Easy;
use JSON qw(decode_json);

our $VERSION = '0.02';

sub new {
    my $class = shift;
    my $self = bless({}, $cla
. uri_escape($value));
        }
    }
    
    # add default params
    push(@request_params, "f=json");
    
    my ($http_code, $buffer) = $self->_query_api(join("&", @request_params));
    
    # 

    
    my $decoded_json = decode_json($buffer);
    if(not defined $decoded_json->{'success'}) {
        warn "unable to read json";
        return 1;
    } elsif($decoded_json->{'success'} == 0) {
Mojolicious-Plugin-CacheMoney ( A/AM/AMIRITE/Mojolicious-Plugin-CacheMoney-0.03.tar.gz, AMIRITE, 2014; MetaCPAN )
Mojolicious-Plugin-CacheMoney/lib/Mojolicious/Plugin/CacheMoney.pm ( view source; MetaCPAN )
  , namespace => decamelize( ref $app ) .':'. $app->mode
        , serializer => { serializer => 'JSON::XS', compress => 1 }
    };
    $app->attr( __chi => sub {
        return new CHI ( %{ $opts->{ 
ace => decamelize( ref $self ) .':'. $self->mode
                , serializer => { serializer => 'JSON::XS', compress => 1 }
            }
        } );
    }

then

    package App::Example;
    use M
me_results;
            return $res;
        }, expires_in => 60 );
        return $self->render( json => { res1 => $res1, res3 => $res3, also_res1 => $also_res1, res2 => $res2 } );
    }

See L<CHI> 
WWW-Jawbone-Up ( A/AB/ABERNDT/WWW-Jawbone-Up-1.32.4.tar.gz, ABERNDT, 2014; MetaCPAN )
WWW-Jawbone-Up/lib/WWW/Jawbone/Up/User.pm ( view source; MetaCPAN )
ackage WWW::Jawbone::Up::User;

use 5.010;
use strict;
use warnings;

use base 'WWW::Jawbone::Up::JSON';

__PACKAGE__->add_accessors(
  qw(first last name short_name), {
    friend => 'user_is_friend'
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Message/Raw.pm ( view source; MetaCPAN )
se;
use JSON::Any;
use Method::Signatures;
use Carp;

use Moose::Util::TypeConstraints;

# ABSTRACT: Raw, low-level access to Exobrain packets
our $VERSION = '1.08'; # VERSION


my $json = JSON::Any->
s[0];
        my (undef, $namespace, $source) = split(/_/, $frames->[0]);
        my $metadata = $json->decode( $frames->[1] );
        return $class->$orig(
            namespace => $namespace,
     
es},
            summary   => $frames->[2],
            data      => $json->decode( $frames->[3] ),
            raw       => $json->decode( $frames->[4] ),
            nosend    => 1,
        );
    }
WWW-Jawbone-Up ( A/AB/ABERNDT/WWW-Jawbone-Up-1.32.4.tar.gz, ABERNDT, 2014; MetaCPAN )
WWW-Jawbone-Up/lib/WWW/Jawbone/Up/Workout.pm ( view source; MetaCPAN )
age WWW::Jawbone::Up::Workout;

use 5.010;
use strict;
use warnings;

use base 'WWW::Jawbone::Up::JSON';

__PACKAGE__->add_accessors(qw(title), { complete => 'is_complete' });

__PACKAGE__->add_time_a
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/JSONify.pm ( view source; MetaCPAN )
package Exobrain::JSONify;
use Moose::Role;
use Storable qw(dclone);
use Data::Structure::Util qw(unbless);

# Basic role that allows converting self object into JSON.
# Really we should use MooseX::S


sub TO_JSON {
    my ($self) = @_;

    return unbless dclone $self;   # Yuck!
}


1;

__END__

=pod

=head1 NAME

Exobrain::JSONify

=head1 VERSION

version 1.08

=for Pod::Coverage TO_JSON

=head1
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Message.pm ( view source; MetaCPAN )
Constraints;
use Carp;
use ZMQ::Constants qw(ZMQ_SNDMORE);
use ZMQ;
use JSON::Any;
use Data::Dumper;

use Exobrain::Types qw(JSON);

# ABSTRACT: Top-level role for all exobrain messages
our $VERSION =
# data.

requires qw(summary);

# TODO: We should use JSON::XS, because we need specialised features
#       for handling objects.

my $json = JSON::Any->new( convert_blessed => 1 );

# We define a du
s;

    push(@frames, join("_", "EXOBRAIN", $self->namespace, $self->source));
    push(@frames, $json->encode( {
        timestamp => $self->timestamp,
        roles     => $self->roles,
        # TO
Text-Md2Inao ( G/GF/GFUJI/Text-Md2Inao-0.11.tar.gz, GFUJI, 2014; MetaCPAN )
Text-Md2Inao/lib/Text/Md2Inao/Builder.pm ( view source; MetaCPAN )
d2Inao::Builder;
use utf8;
use strict;
use warnings;

use Class::Accessor::Fast qw/antlers/;

use JSON;
use Path::Tiny;

has dispatch_table => ( is => 'rw' );

has before_filter_config  => ( is => 'rw
ult};
}

sub load_filter_config {
    my ($self, $path) = @_;
    my $json = path($path)->slurp;
    my $config = decode_json $json;
    for (qw/before_filter after_filter/) {
        if ($config->{$_
Exobrain-Foursquare ( P/PJ/PJF/Exobrain-Foursquare-0.01.tar.gz, PJF, 2014; MetaCPAN )
Exobrain-Foursquare/lib/Exobrain/Agent/Foursquare.pm ( view source; MetaCPAN )
 %full_args );

    # Make our call, and decode the resulting JSON.

    $self->mech->get("$base/$path?$arguments");
    return $self->json->decode( $self->mech->content );

}

1;

__END__

=pod

=hea
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Types.pm ( view source; MetaCPAN )
nings;

use JSON::Any;

# ABSTRACT: Type system for Exobrain
our $VERSION = '1.08'; # VERSION


my $json = JSON::Any->new( allow_blessed => 1 );

use MooseX::Types -declare => [qw(
    JSON
    POI
  
 HashRef
    Ref
    Str
    Num
    Int
);

subtype JSON,
    as Str,
    where { $json->decode($_) }
;

coerce JSON,
    from Ref,
    via { $json->encode($_) }
;

subtype SmsStr,
    as Str,
    wh
OAuth2-Google-Plus ( M/MV/MVHENTEN/OAuth2-Google-Plus-0.03.tar.gz, MVHENTEN, 2014; MetaCPAN )
OAuth2-Google-Plus/lib/OAuth2/Google/Plus/UserInfo.pm ( view source; MetaCPAN )
:Google::Plus::UserInfo;
    use Moo;
    use MooX::late;

    use LWP::UserAgent;
    use JSON qw|decode_json|;
    use Carp::Assert;
    use URI;

    has access_token => (
        is         => 'ro
esponse );

        if( $response->is_success ){
            my $json     = decode_json( $response->content );
            return $json;
        }

        return {};
    }

    sub is_success {
     
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Parser.pm ( view source; MetaCPAN )
tically available for you here
		$c->template('stuff.html');
	}

	post '^/$' returns 'application/json' {
		# do stuff
	}

	1;

=head1 DESCRIPTION

This module is meant to be used by <Leyland controll
Business-Bitpay ( U/UN/UNDEF/Business-Bitpay-0.05.tar.gz, UNDEF, 2014; MetaCPAN )
Business-Bitpay/lib/Business/Bitpay.pm ( view source; MetaCPAN )
se 5.008_001;
our $VERSION = '0.05';
eval $VERSION;

use HTTP::Request;
use URI;
use JSON qw(encode_json decode_json);
use LWP::UserAgent;
require Carp;

sub new {
    my ($class, $api_key, @args) = @
  if ($data) {
        $method = 'POST';
        $data   = encode_json $data;
        push @fields, 'Content-Type' => 'application/json';
    }

    my $request = HTTP::Request->new(
        $method =
($http_response->status_line)
      unless $http_response->is_success;

    my $response = decode_json($http_response->decoded_content);

    if (my $error = $response->{error}) {
        my $messages
Template-Plugin-React ( F/FB/FBELTON/Template-Plugin-React-0.008.tar.gz, FBELTON, 2014; MetaCPAN )
Template-Plugin-React/lib/Template/Plugin/React.pm ( view source; MetaCPAN )

use base qw(Template::Plugin);
use Template::Plugin;

use Template::Plugin::React::RESimple;
use JSON;
use Encode;

sub from_file {
    my ($fname) = @_;

    my $out = '';
    open my $fh, '<:encodi
tes => $templates
    }, $class;
}

sub render {
    my ($self, $name, $data) = @_;

    my $json = to_json($data // {}, {utf8 => 1});
    my $built = from_file $self->{templates};

    my $res = $sel

$self->{prelude};
var React = global.React;

$built;
return React.renderComponentToString($name($json));

})();
    |);

    if($res) {
        return Encode::decode("utf8", $self->{ctx}->output());
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Manual.pod ( view source; MetaCPAN )
ces to representations in the format your client
wants to receive, like JSON and XML. It will also automatically deserialize
JSON/XML requests coming from the client to Perl data-structures.

=item * 
OAuth2-Google-Plus ( M/MV/MVHENTEN/OAuth2-Google-Plus-0.03.tar.gz, MVHENTEN, 2014; MetaCPAN )
OAuth2-Google-Plus/lib/OAuth2/Google/Plus.pm ( view source; MetaCPAN )
kage OAuth2::Google::Plus;
    use Moo;
    use MooX::late;

    use Carp::Assert;
    use JSON qw|decode_json|;
    use LWP::UserAgent;
    use URI;

    sub ENDPOINT_URL {
        return 'https://ac
onse( $response );

        if( $response->is_success ){
            my $json     = decode_json( $response->content );
            return $json->{access_token};
        }

        return;
    }
}

1;
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Manual/Exceptions.pod ( view source; MetaCPAN )
n catches the exception and properly serializes it to a format
the client supports, such as HTML, JSON or XML (or plain text when the client
does not support any of these formats). If the request was 
turned to the browser. If the
request was initiated from a JSON client, such as with an AJAX request, then
the error will be returned in JSON format.

=head1 PRETTIFYING EXCEPTIONS

By default, when r
hash-ref passed to C<< $c->exception() >>, you can, for example, add a template
for C<application/json> requests if you see fit.

In the future, I plan to have Leyland make it easier to globally set t
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Manual/Views.pod ( view source; MetaCPAN )
the
clients are web browsers, but also RSS/Atom when your clients are
feed readers and maybe even JSON if your platform has some cool AJAX admin
interface to it.

=head1 DATA SERIALIZATION

Before we 
ormat
such as XML or JSON. The reverse process is called deserialization.

Leyland takes care of both processes by itself. If you have resources for
which you wish to generate JSON/XML representations
 'applications/json'> for example, see L<Leyland::Manual::Controllers/"ROUTES">
for more information), and just return the data structure as-is from the
route. If the client accepts JSON/XML, Leyland 
Akamai-Open-DiagnosticTools ( P/PR/PROBST/Akamai-Open-DiagnosticTools-0.02.tar.gz, PROBST, 2014; MetaCPAN )
Akamai-Open-DiagnosticTools/lib/Akamai/Open/DiagnosticTools.pm ( view source; MetaCPAN )
ai::Open::DiagnosticTools::VERSION = '0.02';
use strict;
use warnings;
use v5.10;

use Moose;
use JSON;

#XXX create a useful scheme for REST methods
use constant {
    TOOLS_URI  => '/diagnostic-tool
(sprintf('HTTP response code for dig() call is %s', $self->response->code()));
    $data = decode_json($self->response->content());
    given($self->response->code()) {
        when($_ == 200) {
     
(sprintf('HTTP response code for mtr() call is %s', $self->response->code()));
    $data = decode_json($self->response->content());
    given($self->response->code()) {
        when($_ == 200) {
     
WWW-Pushover ( O/OG/OGATA/WWW-Pushover-0.01.tar.gz, OGATA, 2014; MetaCPAN )
WWW-Pushover/lib/WWW/Pushover.pm ( view source; MetaCPAN )
    => eval {
    return 0 if HAVE_HTTP_TINY; # unnecessary
    require LWP::UserAgent; 1;
};
use JSON::PP;

use constant ENDPOINT_URL   => 'https://api.pushover.net';
use constant HTTP_TIMEOUT   => 1
my $res = $self->_http_get( ENDPOINT_URL . '/1/sounds.json?token=' . $self->{token} );
    if ( $res->{success} ) {
        my $data = $self->_json_parser->decode($res->{content});
        my @sounds 
Sounds API is failed.";
    }
}

# JSON Parser accessor
sub _json_parser {
    my $self = shift;
    $self->{json_parser} ||= JSON::PP->new();
    return $self->{json_parser};
}

# Browser accessor
su

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.