Group
Extension

Matches 35359

ZMQ ( D/DM/DMAKI/ZMQ-1.06.tar.gz, DMAKI, 2014; MetaCPAN )
ZMQ/lib/ZMQ/Serializer.pm ( view source; MetaCPAN )
use JSON ();

    ZMQ::register_read_type(json => \&JSON::decode_json);
    ZMQ::register_write_type(json => \&JSON::encode_json);

    my $sock = $ctx->socket( ... );

    $sock->sendmsg_as( json => 
$payload );
    my $payload = $sock->recvmsg_as( 'json' );

=head1 DESCRIPTION

You can add a simple serialization/deserialization mechanism to ZMQ by enabling this module.

To enable serialization, y
le, for JSON we do
the following (this is already done for you in ZMQ.pm if you have
JSON.pm installed):

    use JSON ();
    ZMQ::Serializer::register_write_type('json' => \&JSON::encode_json);
    
JE ( S/SP/SPROUT/JE-0.066.tar.gz, SPROUT, 2014; MetaCPAN )
JE/lib/JE/String.pm ( view source; MetaCPAN )
(@_)
	);
}


sub value {
	defined $_[0][1] ? $_[0][1] : ($_[0][1] = desurrogify($_[0][0]));
}
*TO_JSON=*value;

sub value16 {
	defined $_[0][0] ? $_[0][0] : ($_[0][0] = surrogify($_[0][1]));
}


sub t
JE ( S/SP/SPROUT/JE-0.066.tar.gz, SPROUT, 2014; MetaCPAN )
JE/lib/JE.pm ( view source; MetaCPAN )
have overloaded operators)

=item -

The JavaScript datatypes provide C<TO_JSON> methods for compatibility with
L<JSON.pm|JSON>.

=back

JE's greatest weakness is that it's slow (well, what did you ex
JE ( S/SP/SPROUT/JE-0.066.tar.gz, SPROUT, 2014; MetaCPAN )
JE/lib/JE/Null.pm ( view source; MetaCPAN )
an.

=cut

#use Carp;
sub new    { bless \do{my $thing = $_[1]}, $_[0] }
sub value  { undef }
*TO_JSON=*value;
sub typeof { 'object' }
sub id     { 'null' }
sub primitive { 1 }
sub to_primitive { $_[0
JE ( S/SP/SPROUT/JE-0.066.tar.gz, SPROUT, 2014; MetaCPAN )
JE/lib/JE/Object.pm ( view source; MetaCPAN )
lf.

=cut

sub value {
	my $self = shift;
	+{ map +($_ => $self->prop($_)), $self->keys };
}

*TO_JSON=*value;




sub id {
	refaddr shift;
}

sub primitive { !1 };

sub prototype {
	@_ > 1 ? (${+shif
JE ( S/SP/SPROUT/JE-0.066.tar.gz, SPROUT, 2014; MetaCPAN )
JE/lib/JE/Number.pm ( view source; MetaCPAN )
Number')->prop(shift)->apply(
		$self,$$self[1]->upgrade(@_)
	);
}

sub value {
	shift->[0]
}
*TO_JSON=*value;

sub exists { !1 }

sub typeof    { 'number' }
sub class     { 'Number' }
sub id        {
JE ( S/SP/SPROUT/JE-0.066.tar.gz, SPROUT, 2014; MetaCPAN )
JE/lib/JE/Object/Array.pm ( view source; MetaCPAN )
ugh which you can modify the
object, use C<@$a>.

=cut

sub value { [@{$${+shift}{array}}] };
*TO_JSON=*value;


sub exists {
	my ($self, $name) =  (shift, @_);
	my $guts = $$self;

	if ($name eq 'len
Dist-Zilla-PluginBundle-Apocalyptic ( A/AP/APOCAL/Dist-Zilla-PluginBundle-Apocalyptic-0.005.tar.gz, APOCAL, 2014; MetaCPAN )
Dist-Zilla-PluginBundle-Apocalyptic/lib/Dist/Zilla/PluginBundle/Apocalyptic.pm ( view source; MetaCPAN )
x' => 1,
		}
	],
	qw(
		License
		ModuleBuildTiny
		MakeMaker::Fallback
	),
	qw(
		MetaYAML
		MetaJSON
		InstallGuide
		DOAP
		Covenant
		CPANFile
	),
	);

#	; -- special stuff for README files
#		we 
]	; create Makefile.PL file for older Perls
	[MetaYAML]			; create META.yml file
	[MetaJSON]			; create META.json file
	[ReadmeAnyFromPod]			; create README file
	[ReadmeAnyFromPod / PodRoot]	; create
Test-Apocalypse ( A/AP/APOCAL/Test-Apocalypse-1.006.tar.gz, APOCAL, 2014; MetaCPAN )
Test-Apocalypse/lib/Test/Apocalypse/Dependencies.pm ( view source; MetaCPAN )
check for metadata dependencies

use Test::More;
use File::Slurp 9999.13;
use YAML::Any 0.72;
use JSON::Any 1.25;
use File::Find::Rule 0.32;
use Perl::PrereqScanner 1.000;
use Test::Deep 0.108;
use CP
a
	my $runtime_req;
	my $test_req;
	my $provides;
	if ( -e 'META.json' ) {
		my $file = read_file( 'META.json' );
		my $metadata = JSON::Any->new->Load( $file );
		$runtime_req = $metadata->{'prereqs'
	$provides = $metadata->{'provides'} if exists $metadata->{'provides'};
	} else {
		die 'No META.(json|yml) found!';
	}

	# Okay, scan the files
	my $found_runtime = CPAN::Meta::Requirements->new;
	my
Dist-Zilla-Plugin-Bitbucket ( A/AP/APOCAL/Dist-Zilla-Plugin-Bitbucket-0.001.tar.gz, APOCAL, 2014; MetaCPAN )
Dist-Zilla-Plugin-Bitbucket/lib/Dist/Zilla/Plugin/Bitbucket/Meta.pm ( view source; MetaCPAN )
 = '0.001';
our $AUTHORITY = 'cpan:APOCAL';

# ABSTRACT: Add a Bitbucket repo's info to META.{yml,json}

use Moose;

extends 'Dist::Zilla::Plugin::Bitbucket';
with 'Dist::Zilla::Role::MetaProvider';

ata

=head1 NAME

Dist::Zilla::Plugin::Bitbucket::Meta - Add a Bitbucket repo's info to META.{yml,json}

=head1 VERSION

  This document describes v0.001 of Dist::Zilla::Plugin::Bitbucket::Meta - rele
illa> plugin adds some information about the distribution's Bitbucket
repository to the META.{yml,json} files, using the official L<CPAN::Meta>
specification.

This module currently sets the following
Dist-Zilla-Plugin-Bitbucket ( A/AP/APOCAL/Dist-Zilla-Plugin-Bitbucket-0.001.tar.gz, APOCAL, 2014; MetaCPAN )
Dist-Zilla-Plugin-Bitbucket/lib/Dist/Zilla/Plugin/Bitbucket/Create.pm ( view source; MetaCPAN )
ints;
use HTTP::Tiny 0.050;
use Try::Tiny 0.22;
use MIME::Base64 3.14;
use JSON::MaybeXS 1.002006 qw( encode_json decode_json );
use Git::Wrapper 0.037;
use File::pushd 1.009;

extends 'Dist::Zilla::P
c " . MIME::Base64::encode_base64("$login:$pass", '');
	$headers->{'content-type'} = "application/json";

	# We use the v2.0 API to create
	my $url = 'https://api.bitbucket.org/2.0/repositories/' . $l
ository '%s'", $repo_name ]);
	my $response = $http->request( 'POST', $url, {
		content => encode_json( $params ),
		headers => $headers
	});

	if ( ! $response->{'success'} ) {
		$self->log( ["Error:
Net-OATH-Server ( R/RI/RITOU/Net-OATH-Server-0.02.tar.gz, RITOU, 2014; MetaCPAN )
Net-OATH-Server/lib/Net/OATH/Server/Lite/Endpoint/User.pm ( view source; MetaCPAN )
 => 1;

use Try::Tiny qw/try catch/;
use Plack::Request;
use Params::Validate;
use JSON::XS qw/decode_json encode_json/;
use Convert::Base32 qw/encode_base32/;

use Net::OATH::Server::Lite::Error;
use
s ($request->method eq q{POST});

        # content MUST be JSON
        my $content = {};
        eval {
            $content = decode_json($request->content) if $request->content;
        };
       
Content-Type"  => "application/json;charset=UTF-8",
              "Cache-Control" => "no-store",
              "Pragma"        => "no-cache" ],
            [ encode_json($params) ]);
    } catch {
   
Net-OATH-Server ( R/RI/RITOU/Net-OATH-Server-0.02.tar.gz, RITOU, 2014; MetaCPAN )
Net-OATH-Server/lib/Net/OATH/Server/Lite/Endpoint/Login.pm ( view source; MetaCPAN )
 => 1;

use Try::Tiny qw/try catch/;
use Plack::Request;
use Params::Validate;
use JSON::XS qw/decode_json encode_json/;

use Net::OATH::Server::Lite::Login;
use Net::OATH::Server::Lite::Error;

sub n
s ($request->method eq q{POST});

        my $params;
        eval {
            $params = decode_json($request->content);
        };
        Net::OATH::Server::Lite::Error->throw() unless $params;

 
t-Type"  => "application/json;charset=UTF-8",
                  "Cache-Control" => "no-store",
                  "Pragma"        => "no-cache" ],
                [ encode_json($response_params) ]);
  
Test-Apocalypse ( A/AP/APOCAL/Test-Apocalypse-1.006.tar.gz, APOCAL, 2014; MetaCPAN )
Test-Apocalypse/lib/Test/Apocalypse/FileChecks.pm ( view source; MetaCPAN )
'SIGNATURE' ) {
		push( @files, 'SIGNATURE' );
	}

	# check META.json if it's there
	if ( -e 'META.json' ) {
		push( @files, 'META.json' );
	}

	plan tests => ( ( scalar @files ) * 4 ) + ( ( scalar @p
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2/Security/Policy.pm ( view source; MetaCPAN )
 JSON string that can be passed to
VM::EC2->get_federation_token(), or other AWS libraries.

=head1 STRING OVERLOADING

When used in a string context, this object will interpolate into the
policy JSON
text. In addition,
please see DISCLAIMER.txt for disclaimers of warranty.

=cut

use strict;

use JSON;
use VM::EC2;

use Carp 'croak';
use overload
    '""'     => 'as_string',
    fallback => 1;

su
cal $self->{statements};
        $self->deny('*');
        return $self->as_string;
    }

    my $json = JSON->new();
    $json->canonical(1);

    return $json->encode({Statement => \@list});
}

1;
Limper-SendJSON ( A/AS/ASHLEYW/Limper-SendJSON-0.003.tar.gz, ASHLEYW, 2014; MetaCPAN )
Limper-SendJSON/lib/Limper/SendJSON.pm ( view source; MetaCPAN )
dJSON;
$Limper::SendJSON::VERSION = '0.003';
use base 'Limper';
use 5.10.0;
use strict;
use warnings;

package		# newline because Dist::Zilla::Plugin::PkgVersion and PAUSE indexer
  Limper;

use JSON:
push @Limper::EXPORT, qw/send_json/;

sub send_json {
    my ($data, @options) = @_;
    response->{headers}{'Content-Type'} //= 'application/json';
    try {
        JSON::MaybeXS->new(@options)->enc
or Pod::Coverage

=head1 NAME

Limper::SendJSON - adds a send_json function to Limper

=head1 VERSION

version 0.003

=head1 SYNOPSIS

  use Limper::SendJSON;
  use Limper;   # this must come after al
App-cpangrep ( T/TS/TSIBLEY/App-cpangrep-0.07.tar.gz, TSIBLEY, 2014; MetaCPAN )
App-cpangrep/lib/App/cpangrep.pm ( view source; MetaCPAN )
ur $VERSION = '0.07';

use Config;
use URI::Escape qw(uri_escape);
use LWP::UserAgent;
use JSON qw(decode_json);
use CPAN::DistnameInfo;
use List::Util qw(sum);

our $SERVER = "http://grep.cpan.me";
o
ngth($content) . " bytes");

    my $result = eval { decode_json($content) };
    if ($@ or not $result) {
        warn "Error decoding JSON response: $@\n";
        debug($content);
        return;
 
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2/REST/security_token.pm ( view source; MetaCPAN )
         Same thing, faster to type.

 -policy           A VM::EC2::Security::Policy object, or a JSON string
                     complying with the IAM policy syntax.

The duration must be no shorte
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2/Instance/Metadata.pm ( view source; MetaCPAN )
AWSEC2/latest/UserGuide/UsingIAM.html.

Note that these routines require installation of the perl JSON module, and will
cause a fatal error if this module cannot be loaded.

 iam_info               --
{/^\d+=(.+)/ && $1} @keys;
}

sub iam_info {
    my $self = shift;
    $self->_load_json;
    return JSON::from_json($self->fetch('iam/info'));
}

sub iam_role {
    my $self = shift;
    return $self
_from_json');
    return VM::EC2::Security::Credentials->new_from_json($data,$self->endpoint);
}

sub _load_json {
    return if JSON->can('decode');
    eval "require JSON; 1" or croak "no JSON modul
VM-EC2 ( L/LD/LDS/VM-EC2-1.28.tar.gz, LDS, 2014; MetaCPAN )
VM-EC2/lib/VM/EC2.pm ( view source; MetaCPAN )
CacheDNS ':register';
use HTTP::Request::Common;
use VM::EC2::Error;
use Carp 'croak','carp';
use JSON;

our $VERSION = '1.28';
our $AUTOLOAD;
our @CARP_NOT = qw(VM::EC2::Image    VM::EC2::Volume
    
ndpoint?" . join '&', @param;

    my $response = $self->ua->request($request);

    return JSON::decode_json($response->content);
}

=head2 $url = $ec2->login_url(-credentials => $credentials, -issue

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