Group
Extension

Matches 35359

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
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
Hash-Compact ( K/KE/KENTARO/Hash-Compact-0.06.tar.gz, KENTARO, 2012; MetaCPAN )
Hash-Compact/lib/Hash/Compact.pm ( view source; MetaCPAN )
age My::Memcached;

  use strict;
  use warnings;
  use parent qw(Cache::Memcached::Fast);

  use JSON;
  use Hash::Compact;

  my $OPTIONS = {
      foo => {
          alias_for => 'f',
      },
    
w(decode_json $value, $OPTIONS);
  }

  sub set {
      my ($self, $key, $value, $expire) = @_;
      my $hash = Hash::Compact->new($value, $OPTIONS);
      $self->SUPER::set($key, encode_json $hash->
Mojolicious-Plugin-ServerSession ( J/JO/JONTAYLOR/Mojolicious-Plugin-ServerSession-0.01.zip, JONTAYLOR, 2012; MetaCPAN )
Mojolicious-Plugin-ServerSession/lib/Mojolicious/Plugin/ServerSession.pm ( view source; MetaCPAN )
erver_session_key",
    load => sub { 
      my ($c, $key) = @_;
      my $session_row;
      use JSON;

      unless($session_row = $c->app->schema->resultset('Session')->find($key)) {
        $sessi
->id();
      }

      return( $key, decode_json($session_row->content));
    },
    store => sub { 
      my ($c, $key, $session_hash) = @_;
      use JSON;

      my $session = $c->app->schema->resu
ltset('Session')->find($key);
      if($session) {
        $session->content( encode_json($session_hash) );
        $session->update();
      }
    }
  });


=head1 DESCRIPTION

This is a little plugi
Hubot-Scripts-standup ( A/AA/AANOAA/Hubot-Scripts-standup-0.0.1.tar.gz, AANOAA, 2012; MetaCPAN )
Hubot-Scripts-standup/lib/Hubot/Scripts/standup.pm ( view source; MetaCPAN )
gile standup bot ala tender
use strict;
use warnings;
use List::Util 'shuffle';
use DateTime;
use JSON::XS;

sub load {
    my ( $class, $robot ) = @_;
    $robot->respond(
        qr/(?:cancel|stop) 
.com/api/v1/messages.json')
            ->header({
                Authorization  => "Bearer $ENV{HUBOT_STANDUP_YAMMER_TOKEN}",
                Accept         => 'application/json',
            })
   
 FAILED: $hdr->{Reason}");
                    } else {
                        my $data = decode_json($body);
                        if ($data->{messages}) {
                            $response->s
Gearman-Driver ( P/PL/PLU/Gearman-Driver-0.02007.tar.gz, PLU, 2012; MetaCPAN )
Gearman-Driver/lib/Gearman/Driver.pm ( view source; MetaCPAN )
el free to setup your C<$driver>
this way:

    package My::Workers::One;

    use Moose;
    use JSON::XS;
    extends 'Gearman::Driver::Worker::Base';

    # this method will be registered with gear
ode_json {
        my ( $self, $result ) = @_;
        return JSON::XS::encode_json($result);
    }

    sub decode_json {
        my ( $self, $workload ) = @_;
        return JSON::XS::decode_json($w
_method_by_name($method)->body,
                        decode => 'decode_json',
                        encode => 'encode_json',
                        name   => $method,
                    },
    
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/lib/Dist/Zilla/MintingProfile/Author/BBYRD.pm ( view source; MetaCPAN )
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
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/lib/Dist/Zilla/PluginBundle/Author/BBYRD.pm ( view source; MetaCPAN )
nfig_short_merge('Test::EOL', { trailing_whitespace => 0 }),

      # 
      # [Test::CPAN::Meta::JSON]
      # [Test::CheckDeps]
      # [Test::Portability]
      # ;[Test::Pod::LinkCheck]  ; Both of
]
      # [Test::UseAllModules]
      # [Test::Version]
      (map { 'Test::'.$_ } qw(CPAN::Meta::JSON CheckDeps Portability Synopsis MinimumVersion CheckManifest DistManifest UseAllModules Version)),
 
      # ; META maintenance
      # [MetaConfig]
      # [MetaJSON]
      # [MetaYAML]
      qw( CheckPrereqsIndexed MetaConfig MetaJSON MetaYAML ),
      
      # 
      # [MetaNoIndex]
      # dire
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
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
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(
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
ZeroMQ ( D/DM/DMAKI/ZeroMQ-0.23.tar.gz, DMAKI, 2012; MetaCPAN )
ZeroMQ/lib/ZeroMQ.pm ( view source; MetaCPAN )
ERS{$_[1]} }

eval {
    require JSON;
    JSON->import(2.00);
    register_read_type(json => \&JSON::decode_json);
    register_write_type(json => \&JSON::encode_json);
};

1;
__END__

=head1 NAME

Z
;
        $sock->send($msg);
    }

    # json (if JSON.pm is available)
    $sock->send_as( json => { foo => "bar" } );
    my $thing = $sock->recv_as( "json" );

    # custom serialization
    ZeroM
ample, for JSON we do
the following (this is already done for you in ZeroMQ.pm if you have
JSON.pm installed):

    use JSON ();
    ZeroMQ::register_write_type('json' => \&JSON::encode_json);
    Zer
AnyEvent-Campfire-Client ( A/AA/AANOAA/AnyEvent-Campfire-Client-0.0.2.tar.gz, AANOAA, 2012; MetaCPAN )
AnyEvent-Campfire-Client/lib/AnyEvent/Campfire/Client.pm ( view source; MetaCPAN )

use AnyEvent::HTTP::ScopedClient;
use AnyEvent::Campfire::Stream;
use URI;
use MIME::Base64;
use JSON::XS;
use Try::Tiny;

extends 'AnyEvent::Campfire';

has 'account' => (
    is  => 'ro',
    isa =
   my ( $self, $room, $text ) = @_;

    $self->post(
        "/room/$room/speak",
        encode_json( { message => { body => $text } } ),
        sub {
            my ( $body, $hdr ) = @_;
         
);
}

sub put_room {
    my ( $self, $room, $room_info, $callback ) = @_;
    $room_info = encode_json($room_info) if ref($room_info) eq 'HASH';
    $self->put( "/room/$room", $room_info, $callback );
MooseX-Validation-Doctypes ( D/DO/DOY/MooseX-Validation-Doctypes-0.05.tar.gz, DOY, 2012; MetaCPAN )
MooseX-Validation-Doctypes/lib/MooseX/Validation/Doctypes/Errors.pm ( view source; MetaCPAN )
',
);


has extra_data => (
    is        => 'ro',
    predicate => 'has_extra_data',
);


sub TO_JSON {
    my $self = shift;

    return {
        ($self->has_errors     ? (errors     => $self->erro
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",
    
 the data to the
doctype.

=head2 TO_JSON

Returns a hashref with keys of C<errors> and C<extra_data>, containing the
values of those attributes. This allows L<JSON> to properly encode the error
objec
Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry/Model/Pantry.pm ( view source; MetaCPAN )
,
  isa => AbsDir,
  coerce => 1,
  default => sub { dir(".")->absolute }
);

# where environment JSON files and node subdirectories are stored
sub _environment_dir {
  my ($self) = @_;
  my $path = $
$path;
}

# file path where environment JSON file is located
sub _environment_path {
  my ($self, $env) = @_;
  return $self->_environment_dir->file("${env}.json");
}

sub _node_path {
  my ($self, $n
rn $self->_node_dir($env)->file("${node_name}.json");
}

sub _role_path {
  my ($self, $role_name) = @_;
  return $self->_role_dir->file("${role_name}.json");
}

sub _cookbook_path {
  my ($self, $coo
Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry/Model/Environment.pm ( view source; MetaCPAN )
new;
  }
  $data->{json_class} = "Chef::Environment";
  $data->{chef_type} = "environment";
  return $data;
}

sub _thaw {
  my ($self, $data) = @_;
  delete $data->{$_} for qw/json_class chef_type/;
Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry.pm ( view source; MetaCPAN )
ll be prompted to confirm
deletion.

=head3 show

  $ pantry show node NAME

Prints to STDOUT the JSON data for the given C<NAME>.

=head3 apply

  $ pantry apply node NAME --recipe nginx --role mail 
al string containing 'true' or 'false', it will be
replaced in the configuration data with actual JSON boolean values.

N.B. While the term C<--default> is used for command line consistency, attribute
iable C<EDITOR> on
the configuration file for the C<name> node.

The resulting file must be valid JSON in a form acceptable to Chef.  Generally,
you should use the C<apply> or C<strip> commands instea
Message-Passing ( B/BO/BOBTFISH/Message-Passing-0.110.tar.gz, BOBTFISH, 2012; MetaCPAN )
Message-Passing/lib/Message/Passing/Manual/Cookbook.pod ( view source; MetaCPAN )
og::Dispatch;
    use Log::Dispatch::Message::Passing;
    use Message::Passing::Filter::Encoder::JSON;
    use Message::Passing::Output::ZeroMQ;

    my $log = Log::Dispatch->new;

    $log->add(Log:
egate_log',
        min_level => 'debug',
        output    => Message::Passing::Filter::Encoder::JSON->new(
            output_to => Message::Passing::Output::ZeroMQ->new(
                connect => 
Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry/Model/Role.pm ( view source; MetaCPAN )
run_list ];
  }
  $data->{json_class} = "Chef::Role";
  $data->{chef_type} = "role";
  return $data;
}

sub _thaw {
  my ($self, $data) = @_;
  delete $data->{$_} for qw/json_class chef_type/;
  for m

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