Group
Extension

Matches 35358

Net-Todoist ( N/NE/NEILB/Net-Todoist-0.06.tar.gz, NEILB, 2014; MetaCPAN )
Net-Todoist/lib/Net/Todoist.pm ( view source; MetaCPAN )
 to the API for Todoist (a to-do list service)

use strict;
use warnings;
use LWP::UserAgent;
use JSON::XS;
use Carp 'croak';
use vars qw/$errstr/;

sub new {
    my $class = shift;
    my $args = sca
        $args->{ua} = LWP::UserAgent->new(%$ua_args);
    }
    unless ( $args->{json} ) {
        $args->{json} = JSON::XS->new->utf8->allow_nonref;
    }

    bless $args, $class;
}

sub errstr { $e
'LOGIN_ERROR' ) {
        $errstr = $resp->content;
        return;
    }

    my $data = $self->{json}->decode( $resp->content );
    $self->{token} = $data->{api_token};
    return $data;
}

sub get
Net-Twitter-Loader ( T/TO/TOSHIOITO/Net-Twitter-Loader-0.04.tar.gz, TOSHIOITO, 2014; MetaCPAN )
Net-Twitter-Loader/lib/Net/Twitter/Loader.pm ( view source; MetaCPAN )
package Net::Twitter::Loader;
use strict;
use warnings;
use JSON qw(decode_json encode_json);
use Try::Tiny;
use Carp;
use Time::HiRes qw(sleep);

our $VERSION = "0.04";

our @CARP_NOT = qw(Try::Tiny 
$self->{filepath} or return undef;
    my $json_text = do { local $/ = undef; <$file> };
    close $file;
    my $since_ids = try {
        decode_json($json_text);
    }catch {
        my $e = shift;

        $self->_log("warn", "failed to decode_json");
        return {};
    };
    $since_ids = {} if not defined $since_ids;
    return $since_ids;
}

sub _log {
    my ($self, $level, $msg) = @_;
App-HTRender ( L/LA/LAJANDY/App-HTRender-1.00.tar.gz, LAJANDY, 2014; MetaCPAN )
App-HTRender/lib/App/HTRender.pm ( view source; MetaCPAN )
nder --template=template.html --values=values.json --output=output.html [--config=config.json] 
 
 # Render template tmpl.html with values from values.json into webpage.html
 # You can use single-lett
ues.json -o webpage.html
 
 # Same as above, but configure the template object using values from 
 # the config.json file
 ht_render -t tmpl.html -V values.json -o webpage.html --config=config.json
  
:Template file.

=head2 --values

The path to the values file.  The values file should describe a JSON object, 
which will be parsed into a Perl hash.  The keys of the hash should correspond 
to varia
Plack-App-JSONRPC ( N/NQ/NQOUNET/Plack-App-JSONRPC-0.02.tar.gz, NQOUNET, 2014; MetaCPAN )
Plack-App-JSONRPC/lib/Plack/App/JSONRPC.pm ( view source; MetaCPAN )
package Plack::App::JSONRPC;
use 5.008001;
use strict;
use warnings;
our $VERSION = "0.02";

use parent qw(Plack::Component);
use JSON::RPC::Spec;
use Plack::Request;
use Plack::Util::Accessor qw(rpc)
;

sub prepare_app {
    my ($self) = @_;
    my $rpc = JSON::RPC::Spec->new;
    while (my ($name, $callback) = each %{$self->{methods}}) {
        $rpc->register($name, $callback);
    }
    $self->
tent-Type' => 'application/json'], [$body]];
    }
    return [204, [], []];
}

1;
__END__

=encoding utf-8

=head1 NAME

Plack::App::JSONRPC - (DEPRECATED) Yet another JSON-RPC 2.0 psgi application

App-Nostray ( M/MI/MILA/App-Nostray-1.01.tar.gz, MILA, 2014; MetaCPAN )
App-Nostray/lib/App/Nostray.pm ( view source; MetaCPAN )
ostray;
$App::Nostray::VERSION = '1.01';
use File::Next;
use Getopt::Std;
use JavaScript::V8;
use JSON;
use File::Slurp;

=head1 NAME

App::Nostray - Detect and eliminate stray commas in Javascript so
DJSON ( I/IN/INGY/DJSON-0.0.8.tar.gz, INGY, 2014; MetaCPAN )
DJSON/lib/DJSON.pod ( view source; MetaCPAN )
head1 NAME

DJSON - Decommisioned. Use JSONY.pm instead.

=for html
<a href="https://travis-ci.org/ingydotnet/djson-pm"><img src="https://travis-ci.org/ingydotnet/djson-pm.png" alt="djson-pm"></a>
<a 
ngydotnet/djson-pm?branch=master"><img src="https://coveralls.io/repos/ingydotnet/djson-pm/badge.png" alt="djson-pm"></a>

=head1 SYNOPSIS

    use DJSON;

    my $data = decode_djson $djson_string;

=head1 DESCRIPTION

DJSON is a data language that is simlar to JSON, just more chill. All valid
JSON is also valid DJSON (and represents the same thing when decoded), but
DJSON lets you omit a lot of 
Stackato-Stackrad ( I/IN/INGY/Stackato-Stackrad-0.13.tar.gz, INGY, 2014; MetaCPAN )
Stackato-Stackrad/lib/Stackato/Stackrad.pm ( view source; MetaCPAN )
Curses::UI;
use LWP::UserAgent;
use LWP::Protocol::https;
use HTTP::Request;
use URI::Escape;
use JSON::XS;
use YAML::XS;

our $SELF;
sub PPP {
    my $self = $SELF;
    my $text = YAML::XS::Dump(@_);
rized. Maybe you need to login as an admin user?";
        } else {
            my $data = decode_json($response->content);
            for (0 .. $#{$data}) {
                my $user = $data->[$_];
 
      $self->error("Couldn't login.");
        return $self->logout;
    }
    my $token = decode_json($response->content)->{token};
    $self->current_target->{user} = $username;
    $self->current_t
Plack-Middleware-ProxyMap ( I/IN/INGY/Plack-Middleware-ProxyMap-0.20.tar.gz, INGY, 2014; MetaCPAN )
Plack-Middleware-ProxyMap/lib/Plack/Middleware/ProxyMap.pod ( view source; MetaCPAN )
 easily find data, that you
can subsequently display. You can also use REST APIs that offer JSON but not
JSONP, directly from JavaScript.

=head1 CREDIT

This is just a simple way to use L<Plack::App:
Plack-App-SeeAlso ( V/VO/VOJ/Plack-App-SeeAlso-0.14.tar.gz, VOJ, 2014; MetaCPAN )
Plack-App-SeeAlso/lib/Plack/App/SeeAlso.pm ( view source; MetaCPAN )
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
McBain-WithZeroMQ ( I/ID/IDOPEREL/McBain-WithZeroMQ-2.000000.tar.gz, IDOPEREL, 2014; MetaCPAN )
McBain-WithZeroMQ/lib/McBain/WithZeroMQ.pm ( view source; MetaCPAN )
e strict;
use 5.10.0;

use Carp;
use JSON;
use ZMQ::LibZMQ3;
use ZMQ::Constants qw(ZMQ_REP);

our $VERSION = "2.000000";
$VERSION = eval $VERSION;

my $json = JSON->new->utf8->convert_blessed;
my $MAX
>
and L<mcbain-zmq-client>, respectively.

The workers created by this module receive payloads in JSON format, and convert them into the 
hash-refs your API's methods expect to receive. The payload mu
o the clients in JSON as well. Note that if an API method does not return a hash-ref, this runner
module will automatically turn it into a hash-ref to ensure that conversion into JSON will
be possible
Finance-BlockIO ( N/NO/NORTHRUP/Finance-BlockIO-0.02.tar.gz, NORTHRUP, 2014; MetaCPAN )
Finance-BlockIO/lib/Finance/BlockIO.pm ( view source; MetaCPAN )
ockIO;

use 5.006;
use strict;
use warnings FATAL => 'all';

use Carp;
use WWW::Curl::Simple;
use JSON;
use Exporter 'import';
our @EXPORT_OK = qw(get_new_address
                get_my_addresses
    
aw_from_user
                get_current_price);

=head1 NAME

Finance::BlockIO - Perl wrapper to JSON-based Block.io API

=head1 VERSION

Version 0.01

=cut

our $VERSION = '0.02';

=head1 SYNOPSIS

 provides a bare interface to the Block.io JSON-based API,
using WWW::Curl::Simple to make requests and returning a Perl data structure
created from any JSON response received.

You'll probably need a
Plack-App-SeeAlso ( V/VO/VOJ/Plack-App-SeeAlso-0.14.tar.gz, VOJ, 2014; MetaCPAN )
Plack-App-SeeAlso/lib/SeeAlso/Format/seealso.pm ( view source; MetaCPAN )
}

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
McBain-WithGearmanXS ( I/ID/IDOPEREL/McBain-WithGearmanXS-2.000000.tar.gz, IDOPEREL, 2014; MetaCPAN )
McBain-WithGearmanXS/lib/McBain/WithGearmanXS.pm ( view source; MetaCPAN )
use warnings;
use strict;

use Carp;
use Gearman::XS qw(:constants);
use Gearman::XS::Worker;
use JSON;

our $VERSION = "2.000000";
$VERSION = eval $VERSION;

=head1 NAME
 
McBain::WithGearmanXS - Loa
orkers created receive payloads in JSON format, and convert them into the hash-refs your
API's methods expect to receive. Results are sent back to the clients in JSON as well. Note
that if an API meth
ref, this runner module will automatically
turn it into a hash-ref to ensure that conversion into JSON will be possible. The created
hash-ref will have one key - holding the method's name, with whatev
Net-Async-SPORE ( T/TE/TEAM/Net-Async-SPORE-0.003.tar.gz, TEAM, 2014; MetaCPAN )
Net-Async-SPORE/lib/Net/Async/SPORE/Definition.pm ( view source; MetaCPAN )
SCRIPTION

No user-serviceable parts inside. See L<Net::Async::SPORE::Loader> instead.

=cut

use JSON::MaybeXS;

=head2 new

Instantiates this object.

=cut

sub new { my $class = shift; bless { @_ }
eq) = @_;
	$self->_transport->do_request(
		request => $req
	)->transform(
		done => sub { decode_json(shift->content) }
	)
}

1;

__END__

=head1 AUTHOR

Tom Molesworth <cpan@perlsite.co.uk>

=head1 
Router-R3 ( C/CI/CINDY/Router-R3-0.011001.tar.gz, CINDY, 2014; MetaCPAN )
Router-R3/R3.xs ( view source; MetaCPAN )
efine.h" */
/* #include "str_array.h" */
/* #include "match_entry.h" */

#ifdef ENABLE_JSON
#include <json-c/json.h>
#endif


#ifdef __cplusplus
extern "C" {
#endif

struct _edge;
struct _node;
struct
_JSON
json_object * r3_edge_to_json_object(const edge * e);
json_object * r3_node_to_json_object(const node * n);
json_object * r3_route_to_json_object(const route * r);

const char * r3_node_to_json_
string_ext(const node * n, int options);
const char * r3_node_to_json_pretty_string(const node * n);
const char * r3_node_to_json_string(const node * n);
#endif

#ifdef __cplusplus
}
#endif

#endif /*
jQluster-Server-WebSocket ( T/TO/TOSHIOITO/jQluster-Server-WebSocket-0.03.tar.gz, TOSHIOITO, 2014; MetaCPAN )
jQluster-Server-WebSocket/lib/jQluster/Server/WebSocket.pm ( view source; MetaCPAN )
;
use Plack::App::WebSocket;
use Scalar::Util qw(weaken refaddr);
use Try::Tiny;
use JSON qw(decode_json encode_json);

our $VERSION = "0.03";

sub new {
    my ($class, @args) = @_;
    my $self = $c
e_str) = @_;
            return if !$self;
            try {
                my $message = decode_json($message_str);
                if(!ref($message) || ref($message) ne "HASH") {
                  
> sub {
            my ($send_message) = @_;
            try {
                $conn->send(encode_json($send_message));
            }catch {
                my $e = shift;
                return !$sel
WebService-Lingr-Archives ( T/TO/TOSHIOITO/WebService-Lingr-Archives-0.03.tar.gz, TOSHIOITO, 2014; MetaCPAN )
WebService-Lingr-Archives/lib/WebService/Lingr/Archives.pm ( view source; MetaCPAN )
Archives;
use strict;
use warnings;
use 5.10.0;
use Carp;
use LWP::UserAgent;
use URI;
use JSON qw(decode_json);

our $VERSION = '0.03';

sub new {
    my ($class, %args) = @_;
    if(!defined($args{u
!$res->is_success) {
        croak "Network Error: " . $res->status_line;
    }
    return decode_json($res->content);
}

1;

__END__

=pod

=head1 NAME

WebService::Lingr::Archives - load archived me
McBain-WithWebSocket ( I/ID/IDOPEREL/McBain-WithWebSocket-2.000000.tar.gz, IDOPEREL, 2014; MetaCPAN )
McBain-WithWebSocket/lib/McBain/WithWebSocket.pm ( view source; MetaCPAN )
erver

use warnings;
use strict;

use Carp;
use JSON;
use Net::WebSocket::Server;

our $VERSION = "2.000000";
$VERSION = eval $VERSION;

my $json = JSON->new->convert_blessed;

=head1 NAME
 
McBain::W
:WebSocket::Server>.

The created server will be a JSON-in JSON-out service. When a client sends a message to
the server, it is expected to be a JSON string, which will be converted into a hash-ref
an
to JSON as well and sent back to the client.

Note that if an API method does not return a hash-ref, this runner module will automatically
turn it into a hash-ref to ensure that conversion into JSON w
App-MtAws ( V/VS/VSESPB/App-MtAws-1.120.tar.gz, VSESPB, 2014; MetaCPAN )
App-MtAws/lib/App/MtAws/LineProtocol.pm ( view source; MetaCPAN )
MtAws::LineProtocol;

our $VERSION = '1.120';

use strict;
use warnings;
use utf8;
use Carp;

use JSON::XS;
use App::MtAws::Utils;

use Exporter 'import';

our @EXPORT = qw/ get_data send_data/;
our @
n unit-test it (JSON and YAML have different serialization implementeation)
my $json_coder = JSON::XS->new->ascii(1)->allow_nonref;

sub decode_data
{
	my ($data_e) = @_;
	return $json_coder->decode($
data_e);
}

sub encode_data
{
	my ($data) = @_;
	return $json_coder->encode($data);
}


sub get_data
{
	my ($fh) = @_;

	my ($len, $line);

	sysreadfull_chk($fh, $len, 8) &&
	sysreadfull_chk($fh, $lin
App-MtAws ( V/VS/VSESPB/App-MtAws-1.120.tar.gz, VSESPB, 2014; MetaCPAN )
App-MtAws/lib/App/MtAws/GlacierRequest.pm ( view source; MetaCPAN )
etrieve_inventory
{
	my ($self, $format) = @_;

	$format or confess;

	if ($format eq 'json') {
		$format = 'JSON';
	} elsif ($format eq 'csv') {
		$format = 'CSV';
	} else {
		confess "unknown invent
ype;
		if ($ct eq 'text/csv') {
			INVENTORY_TYPE_CSV
		} elsif ($ct eq 'application/json') {
			INVENTORY_TYPE_JSON
		} else {
			confess "Unknown mime-type $ct";
		}
	};
	return ($resp->content, $it
resp->content_type && $resp->content_type eq 'application/json') {
					my $json = JSON::XS->new->allow_nonref;
					my $scalar = eval { $json->decode( $resp->content ); }; # we assume content always 

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