Group
Extension

Matches 35358

ZeroMQ-PubSub ( R/RE/REVMISCHA/ZeroMQ-PubSub-0.10.tar.gz, REVMISCHA, 2012; MetaCPAN )
ZeroMQ-PubSub/lib/ZeroMQ/PubSub/Server.pm ( view source; MetaCPAN )
e Moose;
extends 'ZeroMQ::PubSub';

use ZMQ::LibZMQ2;
use ZMQ::Constants ':all';
use JSON qw/encode_json decode_json/;
use Clone qw/clone/;
use Carp qw/croak/;

# socket to listen for client events
# 
from JSON, or undef if failure.

=cut

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

    my $msg = zmq_recv($self->publish_sock);
    my $json_str = zmq_msg_data($msg);
    my $json = eval { decode_json($json_str)
 };
    unless ($json) {
        warn "Got invalid event: failed to parse JSON: $@";
        return;
    }

    return $json;
}


=head2 broadcast($event)

Sends $event to all connected subscribers.

Tapper-Schema ( A/AM/AMD/Tapper-Schema-4.1.1.tar.gz, TAPPER, 2012; MetaCPAN )
Tapper-Schema/lib/auto/Tapper/Schema/Tapper-Schema-TestrunDB-4.001040-2-MySQL.pl ( view source; MetaCPAN )
#!/usr/bin/env perl

use strict;
use warnings;

require JSON::XS;
require Tapper::Model;

my $or_dbh         = Tapper::Model::model()->storage->dbh;
my $ar_chart_lines = $or_dbh->selectall_arrayref(
 
lines} ) {

    my $hr_json;
    eval {
        $hr_json = JSON::XS::decode_json( $hr_chart_line->{chart_line_statement} );
    };
    if ( $@ ) {
        warn "cannot parse json string: $@";
    }
  
  else {
        if ( $hr_json->{where} ) {
            for my $ar_where_clause ( @{$hr_json->{where}} ) {

                my $s_operator = shift @{$ar_where_clause};
                my $s_column   =
Rose-Planter ( B/BD/BDUGGAN/Rose-Planter-0.34.tar.gz, BDUGGAN, 2012; MetaCPAN )
Rose-Planter/lib/Rose/Planter/DB.pm ( view source; MetaCPAN )
.

=over

=cut

=item DateTime::Duration::TO_JSON

This is defined here to serialize durations as postgres intervals.

=cut

sub DateTime::Duration::TO_JSON {
    my $d = shift;
    return DateTime::F
urn $res unless ref $names && ref $types;

    # Force all bigints into numeric context for JSON.  (see JSON::XS)
    my %name2type = mesh @$names, @$types;
    return $res unless grep /int8/, @$types
Captcha-reCAPTCHA ( P/PH/PHRED/Captcha-reCAPTCHA-0.97.tar.gz, PHRED, 2012; MetaCPAN )
Captcha-reCAPTCHA/lib/Captcha/reCAPTCHA.pm ( view source; MetaCPAN )
 { type => 'text/javascript' },
    "\n//<![CDATA[\n"
     . "var RecaptchaOptions = "
     . $h->json_encode( $options )
     . ";\n//]]>\n"
  ) . "\n";
}

sub get_html {
  my $self = shift;
  my ( $
Business-Stripe ( P/PH/PHAM/Business-Stripe-0.04.tar.gz, PHAM, 2012; MetaCPAN )
Business-Stripe/Stripe.pm ( view source; MetaCPAN )
package Business::Stripe;

use strict;
use warnings;

use JSON;
use LWP::UserAgent;
use HTTP::Request::Common qw/DELETE GET POST/;
use MIME::Base64;

our $VERSION = '0.04';

use constant URL => 'https
th, $method);
}

=head3 error (I<void>)

Method returns C<0> when encounter error conditions.
The JSON object returned by Stripe can be retrieved via this method.

 print $stripe->error->{message}, "\
I<void>)

When calls are successful a positive value is returned
or if possible, the ID. Stripe's JSON object can be retrieved via
this method. Specific values are defined in the Stripe API Documentat
Net-Dropbox-API ( N/NO/NORBU/Net-Dropbox-API-1.9.tar.gz, NORBU, 2012; MetaCPAN )
Net-Dropbox-API/lib/Net/Dropbox/API.pm ( view source; MetaCPAN )
package Net::Dropbox::API;

use common::sense;
use File::Basename qw(basename);
use JSON;
use Mouse;
use Net::OAuth;
use LWP::UserAgent;
use URI;
use HTTP::Request::Common;
use Data::Random qw(rand_ch
lls the users info from dropbox.

=cut

sub account_info {
    my $self = shift;

    return from_json($self->_talk('account/info'));
}

=head2 list

lists all files in the path defined:

    $data = 
_json({ http_response_code => 304 });
               } else {
                   return $self->_talk_default_error_handler($resp);
               }
           },
       };
    }

    return from_json(
Gearman-Driver ( P/PL/PLU/Gearman-Driver-0.02007.tar.gz, PLU, 2012; MetaCPAN )
Gearman-Driver/lib/Gearman/Driver/Worker.pm ( view source; MetaCPAN )
method will be returned to the Gearman
client. This is useful to serialize Perl datastructures to JSON
before sending them back to the client.

    sub do_some_job : Job : Encode : Decode {
        my
ad ) = @_;
        return { message => 'OK', status => 1 };

        # calls 'encode' and returns JSON string: {"status":1,"message":"OK"}
    }

    sub custom_encoder : Job : Encode(enc_yaml) : Deco
lf, $result ) = @_;
        return JSON::XS::encode_json($result);
    }

    sub decode {
        my ( $self, $workload ) = @_;
        return JSON::XS::decode_json($workload);
    }

    sub enc_yam
ZeroMQ-PubSub ( R/RE/REVMISCHA/ZeroMQ-PubSub-0.10.tar.gz, REVMISCHA, 2012; MetaCPAN )
ZeroMQ-PubSub/lib/ZeroMQ/PubSub/Client.pm ( view source; MetaCPAN )
e Moose;
extends 'ZeroMQ::PubSub';

use ZMQ::LibZMQ2;
use ZMQ::Constants ':all';
use JSON qw/encode_json decode_json/;
use Carp qw/croak/;
use List::Util qw/shuffle/;

# should only be used internally
= zmq_recv($self->subscribe_sock);
    my $msg_str = zmq_msg_data($msg_raw);
    my $msg = decode_json($msg_str);
    $self->dispatch_event($msg);
}

after 'subscribe' => sub {
    my ($self, $evt, $c
re we're connected
    $self->connect_publish_sock;

    my $json_str = encode_json($msg);
    my $res = zmq_send($self->publish_sock, $json_str);
    $self->print_debug("Published $evt, res=$res");

Captcha-reCAPTCHA ( P/PH/PHRED/Captcha-reCAPTCHA-0.97.tar.gz, SUNNYP, 2012; MetaCPAN )
Captcha-reCAPTCHA/Captcha-reCaptcha/lib/Captcha/reCAPTCHA.pm ( view source; MetaCPAN )
 { type => 'text/javascript' },
    "\n//<![CDATA[\n"
     . "var RecaptchaOptions = "
     . $h->json_encode( $options )
     . ";\n//]]>\n"
  ) . "\n";
}

=item C<< get_options_setter_div( $pubkey, 
ZeroMQ-PubSub ( R/RE/REVMISCHA/ZeroMQ-PubSub-0.10.tar.gz, REVMISCHA, 2012; MetaCPAN )
ZeroMQ-PubSub/lib/ZeroMQ/PubSub.pm ( view source; MetaCPAN )
package ZeroMQ::PubSub;

use Moose;
use ZMQ::LibZMQ2;
use JSON;
use namespace::autoclean;

with 'MooseX::Callbacks';

has 'context' => (
    is => 'rw',
    isa => 'ZMQ::LibZMQ2::Context',
    lazy_bu
MooseX-Validation-Doctypes ( D/DO/DOY/MooseX-Validation-Doctypes-0.05.tar.gz, DOY, 2012; MetaCPAN )
MooseX-Validation-Doctypes/lib/MooseX/Validation/Doctypes.pm ( view source; MetaCPAN )
address => 'Maybe[Location]',
  };

  use JSON;

  # note the lack of Location,
  # which is fine because it
  # was Maybe[Location]

  my $data = decode_json(q[
      {
          "id": "1234-A",
    
o declare L<Moose> type constraints to validate nested
data structures as you may get back from a JSON web service or something along
those lines. The doctype declaration can be any arbitrarily nested
WebService-Dropbox ( A/AS/ASKADNA/WebService-Dropbox-1.13.tar.gz, ASKADNA, 2012; MetaCPAN )
WebService-Dropbox/lib/WebService/Dropbox/Sharing.pm ( view source; MetaCPAN )
path, $settings, $remove_expiration) = @_;

    # this assumes the api converts 1 and 0 to JSON::true and JSON::false accordingly
	if ($remove_expiration) {
		$remove_expiration = 1;
	} else {
		$remo
Plack-Middleware-JSONP-Headers ( V/VO/VOJ/Plack-Middleware-JSONP-Headers-0.11.tar.gz, VOJ, 2012; MetaCPAN )
Plack-Middleware-JSONP-Headers/lib/Plack/Middleware/JSONP/Headers.pm ( view source; MetaCPAN )
package Plack::Middleware::JSONP::Headers;
{
  $Plack::Middleware::JSONP::Headers::VERSION = '0.11';
}
#ABSTRACT: Wraps JSON response with HTTP headers in JSONP
use strict;

use parent qw(Plack::Middl
eware);

use Plack::Util;
use Plack::Builder;
use URI::Escape ();
use JSON ();
use Scalar::Util 'reftype';
use HTTP::Headers ();
use Plack::Util::Accessor qw(callback_key headers template);

sub prepa
nless ($self->template) {
        $self->template('{ "meta": %s, "data": %s }')
    }
}

sub wrap_json {
    my ($self, $status, $headers, $data) = @_;

    my $meta = { status => $status }; 
    my @
Tapper-CLI ( A/AM/AMD/Tapper-CLI-4.1.0.tar.gz, TAPPER, 2012; MetaCPAN )
Tapper-CLI/lib/Tapper/CLI/Resource.pm ( view source; MetaCPAN )
 resource_list {
        my ($c) = @_;
        $c->getopt( 'name=s@', 'id=i@', 'active', 'free', 'json', 'verbose|v', 'help|?' );
        if ( $c->options->{help} ) {
                say STDERR "$0 re
"    --verbose       Show extended information";
                say STDERR "    --json          Give results as json";
                say STDERR "    --help          Show this help";
               
ies = $resources->all;
        if ($c->options->{json}) {
                require JSON;

                my @json_resources;

                push @json_resources, {
                        id => $_->
Tapper-Reports-DPath ( A/AM/AMD/Tapper-Reports-DPath-4.1.0.tar.gz, AMD, 2012; MetaCPAN )
Tapper-Reports-DPath/lib/Tapper/Reports/DPath/TT.pm ( view source; MetaCPAN )
el';
        use Data::Dumper;
        use Data::DPath 'dpath';
        use DateTime;
        use JSON;
        use YAML::XS;
        use Data::Structure::Util 'unbless';

        has debug           
ta) = @_; dpath($path)->match($data); };
                $Template::Stash::LIST_OPS->{to_json}      = sub { JSON->new->pretty->encode(unbless $_[0]) };
                $Template::Stash::LIST_OPS->{to_
Dancer-Plugin-Tapir ( E/EW/EWATERS/Dancer-Plugin-Tapir-0.04.tar.gz, EWATERS, 2012; MetaCPAN )
Dancer-Plugin-Tapir/lib/Dancer/Plugin/Tapir.pm ( view source; MetaCPAN )
Dancer ':syntax';
use Dancer::Plugin;
use Carp;
use Try::Tiny;
use Capture::Tiny qw(capture);
use JSON::XS qw();
use Scalar::Util qw(blessed);

# POE sessions will be created by Tapir::MethodCall; let
alidator;
use Tapir::MethodCall;
use Tapir::Documentation::NaturalDocs;
use File::Spec;

my $json_xs = JSON::XS->new->allow_nonref->allow_blessed;

our $VERSION = 0.04;

register setup_tapir_documenta
t->params;

            # Decode the JSON payload
            if ($request->content_length && $request->content_type && $request->content_type eq 'application/json' && length $request->body) {
       
Task-BeLike-AMD ( A/AM/AMD/Task-BeLike-AMD-4.1.0.tar.gz, AMD, 2012; MetaCPAN )
Task-BeLike-AMD/lib/Task/BeLike/AMD.pm ( view source; MetaCPAN )
n::Parameters>

=head3 L<Hash::Merge>

=head3 L<Hash::Merge::Simple>

=head3 L<JSON>

=head3 L<JSON::Syck>

=head3 L<JSON::XS>

=head3 L<List::AllUtils>

=head3 L<List::MoreUtils>

=head3 L<Log::Log4p
Tapper-Reports-DPath ( A/AM/AMD/Tapper-Reports-DPath-4.1.0.tar.gz, AMD, 2012; MetaCPAN )
Tapper-Reports-DPath/lib/auto/Tapper/Reports/DPath/Mason/mason_include.pl ( view source; MetaCPAN )
% use 5.010;
% use Tapper::Reports::DPath 'reportdata';
% use Data::Dumper;
% use Data::DPath 'dpath';
% use DateTime;
% use JSON;
% use YAML::XS;
% use Data::Structure::Util 'unbless';
Dist-Zilla-PluginBundle-Author-BBYRD ( B/BB/BBYRD/Dist-Zilla-PluginBundle-Author-BBYRD-0.93.tar.gz, BBYRD, 2012; MetaCPAN )
Dist-Zilla-PluginBundle-Author-BBYRD/README.pod ( view source; MetaCPAN )
pports 2.0
    [NoTabsTests]
    [Test::EOL]
    trailing_whitespace = 0
 
    [Test::CPAN::Meta::JSON]
    [Test::CheckDeps]
    [Test::Portability]
    ;[Test::Pod::LinkCheck]  ; Both of these are b
imum_perl = 5.10.1
 
    [CheckPrereqsIndexed]
 
    ; META maintenance
    [MetaConfig]
    [MetaJSON]
    [MetaYAML]
 
    [MetaNoIndex]
    directory = t
    directory = xt
    directory = examples
these personalized modules on CPAN.  I even bantered
around the idea of using L<MetaCPAN's author JSON input|https://github.com/SineSwiper/Dist-Zilla-PluginBundle-BeLike-You/blob/master/BeLike-You.pod
Catalyst-Authentication-Store-Crowd ( K/KE/KEEKUNG/Catalyst-Authentication-Store-Crowd-0.04.tar.gz, KEEKUNG, 2012; MetaCPAN )
Catalyst-Authentication-Store-Crowd/lib/Catalyst/Authentication/Store/Crowd.pm ( view source; MetaCPAN )
rowd;

our $VERSION = 0.04;

use warnings;
use Moose;

use LWP::UserAgent;
use HTTP::Request;
use JSON;

use Catalyst::Authentication::Store::Crowd::User;

has 'find_user_url' => (
    is => 'ro',
   
t_user( $info->{username} );
    if ( $response->is_success ){
        my $crowd_user_info = from_json( $response->decoded_content );
        return Catalyst::Authentication::Store::Crowd::User->new({
>app->{app_name},
        $self->app->{password}
    );
    $req->header('Accept' => 'application/json');

    my $response = $ua->request( $req );
    return $response;
}

1;

__END__

=head1 NAME

C

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