Group
Extension

Matches 35359

Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry/App/Command/sync.pm ( view source; MetaCPAN )
try sync subcommand
our $VERSION = '0.012'; # VERSION

use Pantry::App -command;
use autodie;
use JSON 2;
use Storable qw/dclone/;
use Net::OpenSSH;
use Path::Class;
use Pantry::Model::Util qw/merge_h
  # prepare node JSON for upload
  # XXX should really check to be sure it exists
  my ($node_fh, $node_json) = tempfile( "node.json-XXXXXX", TMPDIR => 1 );

  $obj->save_as($node_json);

  # XXX Chef
);
  if ( -e $env->path ) { # if we have a data file, then merge it
    my $base = decode_json( file($node_json)->slurp );
    my $env_default = dclone $env->default_attributes;
    my $env_override =
Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry/App/Command/apply.pm ( view source; MetaCPAN )
ry apply subcommand
our $VERSION = '0.012'; # VERSION

use Pantry::App -command;
use autodie;
use JSON;

use namespace::clean;

sub abstract {
  return 'Apply recipes or attributes to a node or role'

  my ($self, $value) = @_;
  if ($value eq 'false') {
    $value = JSON::false;
  }
  elsif ( $value eq 'true' ) {
    $value = JSON::true;
  }
  return $value;
}

1;


# vim: ts=2 sts=2 sw=2 et:

__
Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry/App/Command/show.pm ( view source; MetaCPAN )
head1 DESCRIPTION

This class implements the C<pantry show> command, which is used to
display the JSON data for a node.

=for Pod::Coverage options validate

=head1 AUTHOR

David Golden <dagolden@cpan
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 @
Pantry ( D/DA/DAGOLDEN/Pantry-0.012.tar.gz, DAGOLDEN, 2012; MetaCPAN )
Pantry/lib/Pantry/Model/Node.pm ( view source; MetaCPAN )
rs or array references,
except for boolean values which should be set as L<JSON::Boolean>
values like C<JSON::true> and C<JSON::false>.

=head2 pantry_host

This optional attribute holds an alternate 
Poet ( J/JS/JSWARTZ/Poet-0.13.tar.gz, JSWARTZ, 2012; MetaCPAN )
Poet/lib/Poet/t/Log.pm ( view source; MetaCPAN )
:Log;
BEGIN {
  $Poet::t::Log::VERSION = '0.13';
}
use Poet::Tools qw(rmtree tempdir_simple);
use JSON::XS;
use Test::Class::Most parent => 'Poet::Test::Class';

__PACKAGE__->initialize_temp_env();

s
   my $log_conf = Poet::Log->generate_log4perl_config();
        is( $log_conf, $expected, encode_json($conf_settings) );
    };

    my $default_layout = "%d{dd/MMM/yyyy:HH:mm:ss.SS} [%p] %c - %m - %
Dancer-Plugin-Facebook ( M/MD/MDORMAN/Dancer-Plugin-Facebook-0.991.tar.gz, MDORMAN, 2012; MetaCPAN )
Dancer-Plugin-Facebook/lib/Dancer/Plugin/Facebook.pm ( view source; MetaCPAN )
.. do some stuff to decide if you are supposed to even hit fb ...
    # hypothetically encoded as JSON and parsed by client app
    return {redirect => fb_redirect_url};
  };

  get '/auth/facebook/po
DBIx-Class-Indexer-WebService-Dezi ( L/LO/LOGIE/DBIx-Class-Indexer-WebService-Dezi-0.08.tar.gz, LOGIE, 2012; MetaCPAN )
DBIx-Class-Indexer-WebService-Dezi/lib/DBIx/Class/Indexer/WebService/Dezi.pm ( view source; MetaCPAN )
et_indexer( 'WebService::Dezi', { server => 'http://localhost:5000', content_type => 'application/json' } );
    
    __PACKAGE__->table('person');
    
    __PACKAGE__->add_columns(
        person_id
TTRIBUTES

=head2 as_document( $self, $object )

Handles the insert operation. Generates a XML or JSON document 
that will be indexed by the dezi service.

=cut

sub as_document {
    my ( $self, $obj
Name=>'doc',);
    } elsif ( $self->content_type eq 'application/json' ) {
        require JSON;
        $output_str = JSON::encode_json({ doc => $fields });
    }

    return $output_str;
}

__PACKAG
Net-Rexster-Client ( S/SH/SHOHEIK/Net-Rexster-Client-v0.0.5.tar.gz, SHOHEIK, 2012; MetaCPAN )
Net-Rexster-Client/lib/Net/Rexster/Request.pm ( view source; MetaCPAN )
use strict;
use Carp;

use Moose;
use LWP::UserAgent;
use Net::Rexster::Response;
use Encode;
use JSON;
use URI::Escape;
use utf8;

has 'ua' => (is => 'ro', isa => "LWP::UserAgent", default => sub { L
::Rexster::Response->new(content => {});
    }

    # Decode from JSON and utf8
    return Net::Rexster::Response->new(content => JSON->new->utf8->decode(decode_utf8($response->content))); 
}

1; # Ma
App-MetaCPAN-Gtk2-Notify ( Z/ZW/ZWON/App-MetaCPAN-Gtk2-Notify-0.05.tar.gz, ZWON, 2012; MetaCPAN )
App-MetaCPAN-Gtk2-Notify/lib/App/MetaCPAN/Gtk2/Notify.pm ( view source; MetaCPAN )
ge App::MetaCPAN::Gtk2::Notify;

use 5.006;
use strict;
use warnings;
our $VERSION = '0.05';

use JSON;
use LWP::UserAgent;
use Gtk2::Notify;
use File::Temp ();
use File::Spec;
use File::Slurp qw(writ
HODS

=cut

my $search_url = 'http://api.metacpan.org/v0/release/_search';
my $post_data  = JSON::encode_json(
    {
        'size' => 20,
        'from' => 0,
        'sort' => [ { 'date' => { 'order
ost( $search_url, Content => $post_data );
    if ( $resp->is_success ) {
        my $res = JSON::decode_json( $resp->content );
        return map { $_->{fields} } @{ $res->{hits}{hits} };
    }
    
Dist-Zilla-TravisCI ( B/BB/BBYRD/Dist-Zilla-TravisCI-0.95.tar.gz, BBYRD, 2012; MetaCPAN )
Dist-Zilla-TravisCI/lib/Dist/Zilla/Plugin/Travis/TestRelease.pm ( view source; MetaCPAN )
 reported back with: $result") unless $result->content_type eq 'application/json';

   my $repo_info = $result->content_json;
   $self->log_fatal("Travis CI cannot find your repository; did you forget
 reported back with: $result") unless $result->content_type eq 'application/json';

   my $build_info = $result->content_json;
   $self->log_fatal("Travis CI cannot find your build?!?")
      if (ref 
WebService-XING ( G/GR/GRAF/WebService-XING-0.030.tar.gz, GRAF, 2012; MetaCPAN )
WebService-XING/lib/WebService/XING.pm ( view source; MetaCPAN )
package WebService::XING;

use 5.010;

use Carp ();
use Digest::SHA ();
use JSON ();
use LWP::UserAgent;
use HTTP::Headers;  # ::Fast
use HTTP::Request;
use Mo 0.30 qw(builder chain is required);
use 
st_timeout', chain => 1);
sub _build_request_timeout { 30 }

has json => (builder => '_build_json', chain => 1);
sub _build_json { JSON->new->utf8->allow_nonref }

has warn => (builder => '_build_warn
_build__headers');
sub _build__headers {
    HTTP::Headers->new(
        # Accept => 'application/json, text/javascript, */*; q=0.01',
        'Accept-Encoding' => 'gzip, deflate',
    )
}


### Funct
Net-Rexster-Client ( S/SH/SHOHEIK/Net-Rexster-Client-v0.0.5.tar.gz, SHOHEIK, 2012; MetaCPAN )
Net-Rexster-Client/lib/Net/Rexster/Client.pm ( view source; MetaCPAN )
I.

=head1 INTERFACE 

All of the methods defined here return hash reference which converted form JSON response.
As Net::Rexster::Client provides low level interface, please use Data::Dumper to check 
WWW-Asana ( G/GE/GETTY/WWW-Asana-0.003.tar.gz, GETTY, 2012; MetaCPAN )
WWW-Asana/lib/WWW/Asana/Request.pm ( view source; MetaCPAN )
na::Request::VERSION = '0.003';
}
# ABSTRACT: Asana Request Class

use MooX qw(
	+HTTP::Request
	+JSON
	+URI
	+URI::QueryParam
);

has api_key => (
	is => 'ro',
	required => 1,
);

has to => (
	is => 
uest { shift->_http_request }

has json => (
	is => 'ro',
	lazy => 1,
	builder => 1,
);

sub _build_json {
	my $json = JSON->new;
	$json->allow_nonref;
	return $json;
}

sub _build__http_request {
	my
string;
	if ($self->method ne 'GET') {
		push @headers, ('Content-type', 'application/json');
		$body = $self->json->encode({ data => $self->data });
	} elsif (%data) {
		warn 'Request includes %data 
WWW-Snooze ( A/AG/AGJ/WWW-Snooze-0.01_02.tar.gz, AGJ, 2012; MetaCPAN )
WWW-Snooze/lib/WWW/Snooze/Request.pm ( view source; MetaCPAN )
::Request;

use strict;
use warnings;
use 5.010;

use WWW::Snooze::Serialize::JSON;

use URI;
use LWP::UserAgent;
use JSON;

our $AUTOLOAD;

sub new {
    my $class = shift;
    my $uri = shift;
    m
> [],
        args => {},
        headers => undef,
        serializer => WWW::Snooze::Serialize::JSON->new(),
        %args
    }, $class;
}

sub AUTOLOAD {
    my $self = shift;
    my $name = $AUTO
   $r->foo();
    # Request URL would be http://example.com/foo.json
    
    $r->foo(42)->bar;
    # http://example.com/foo/42/bar.json
    
    $r->foo(undef, foo => 'bar');
    # http://example.com
WWW-Snooze ( A/AG/AGJ/WWW-Snooze-0.01_02.tar.gz, AGJ, 2012; MetaCPAN )
WWW-Snooze/lib/WWW/Snooze.pm ( view source; MetaCPAN )
, REST operations can be
performed like so:

    use WWW::Snooze;
    use WWW::Snooze::Serialize::JSON;
    use HTTP::Headers;
    use Data::Dumper;

    my $api = WWW::Snooze::request(
        'https
new(
            'X-Zen-ApiKey' => 'key'
        ),
        serializer => WWW::Snooze::Serialize::JSON->new(
            extension => ''
        )
    );

    my $tasks = $api->projects(40075)->storie
Test-Nginx ( A/AG/AGENT/Test-Nginx-0.21.tar.gz, AGENT, 2012; MetaCPAN )
Test-Nginx/lib/Test/Nginx.pm ( view source; MetaCPAN )
_drizzle

L<http://github.com/chaoslawful/drizzle-nginx-module>

=item ngx_rds_json

L<http://github.com/agentzh/rds-json-nginx-module>

=item ngx_rds_csv

L<http://github.com/agentzh/rds-csv-nginx-mo
DotCloud-Environment ( P/PO/POLETTIX/DotCloud-Environment-0.9.4.tar.gz, POLETTIX, 2012; MetaCPAN )
DotCloud-Environment/lib/DotCloud/Environment.pm ( view source; MetaCPAN )
v dotvars find_code_dir path_for >],};

our $main_file_path         = '/home/dotcloud/environment.json';
our $main_dotcloud_code_dir = '/home/dotcloud/code';
my @application_keys = qw< environment pro
 \%retval;
} ## end sub _serialize_multiple

sub as_json {
   my $self = shift;
   require JSON;
   return $self->_serialize_multiple(\&JSON::to_json, @_);
}

sub as_yaml {
   my $self = shift;
   req
     or croak 'no suitable environment found';
   if ($env =~ /\A \s* {/mxs) {
      $self->merge_json($env);
   }
   else {
      $self->merge_yaml($env);
   }
   return $self;
} ## end sub load

sub
WWW-Snooze ( A/AG/AGJ/WWW-Snooze-0.01_02.tar.gz, AGJ, 2012; MetaCPAN )
WWW-Snooze/README.pod ( view source; MetaCPAN )
, REST operations can be
performed like so:

    use WWW::Snooze;
    use WWW::Snooze::Serialize::JSON;
    use HTTP::Headers;
    use Data::Dumper;

    my $api = WWW::Snooze::request(
        'https
new(
            'X-Zen-ApiKey' => 'key'
        ),
        serializer => WWW::Snooze::Serialize::JSON->new(
            extension => ''
        )
    );

    my $tasks = $api->projects(40075)->storie
Template-Swig ( D/DC/DCHESTER/Template-Swig-0.02.tar.gz, DCHESTER, 2012; MetaCPAN )
Template-Swig/lib/Template/Swig.pm ( view source; MetaCPAN )
RSION = '0.02';

use JavaScript::V8;
use JSON::XS;

sub new {

	my $self = bless {};

	$self->{context} = JavaScript::V8::Context->new();
	$self->{json} = JSON::XS->new->allow_nonref;

	$self->{templa
e_string;
	my $template_string_json = $self->{json}->encode($template_string);

	die "need a template_name" unless $template_name;
	my $template_name_json = $self->{json}->encode($template_name);

	$s

	var template_string = $template_string_json;
	var template = swig.compile(template_string, { filename: $template_name_json });
	templates[$template_name_json] = template;

	false;
EOT
	confess $@ if

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