Group
Extension

Matches 35359

Dancer-Plugin-Fake-Response ( N/NO/NOUDARD/Dancer-Plugin-Fake-Response-0.03.tar.gz, NOUDARD, 2012; MetaCPAN )
Dancer-Plugin-Fake-Response/lib/Dancer/Plugin/Fake/Response.pm ( view source; MetaCPAN )
nd return data and code configured.

For example for : GET http://localhost/rewrite_fake_route/12.json
return code : 200
return body : {"id":12,"test":"get test"}

In configuation, if you put paramete
ke id : :id
* add possibility to request data store in a file like response_file: file/get_answer.json

=head1 INIT MODULE ROUTE

Each route configured in dancer plugin configuration are declare fakly
 eq $req->{_route_pattern})
          {
            set serializer => uc($req_params{format}) || 'JSON';
            my $response = plugin_setting->{$req->method()}->{$route}->{response};
            
Selenium-Remote-Driver ( A/AI/AIVATURI/Selenium-Remote-Driver-0.15.tar.gz, TEODESIAN, 2012; MetaCPAN )
Selenium-Remote-Driver/lib/Selenium/Remote/Mock/RemoteConnection.pm ( view source; MetaCPAN )
utility class to mock the responses from Selenium server

use strict;
use warnings;

use Moo;
use JSON;
use Carp;
use Try::Tiny;
use HTTP::Response;
use Data::Dumper;

extends 'Selenium::Remote::Remot
undef;

    my $json = JSON->new;
    $json->allow_blessed;
    my $decoded_json = $json->allow_nonref(1)->utf8(1)->decode(<$fh>);
    close($fh);
    $self->session_store($decoded_json);
}

sub dump_
n_store->{$path};
    }
    my $json = JSON->new;
    $json->allow_blessed;
    my $json_session = $json->allow_nonref->utf8->pretty->encode($dump);
    print $fh $json_session;
    close($fh);
}

sub
YAML-Tiny ( A/AD/ADAMK/YAML-Tiny-1.51.tar.gz, ADAMK, 2012; MetaCPAN )
YAML-Tiny/lib/YAML/Tiny.pm ( view source; MetaCPAN )
vailable in JSON, with the additional limitation that only simple keys
are supported.

As a result, all possible YAML Tiny documents should be able to be
transformed into an equivalent JSON document, 
WWW-TMDB-API ( M/MA/MARIAB/WWW-TMDB-API0.04.tar.gz, MARIAB, 2012; MetaCPAN )
WWW-TMDB-API/lib/WWW/TMDB/API.pm ( view source; MetaCPAN )
 warnings;
use Carp;

our $VERSION = '0.04';
use utf8;
use LWP::UserAgent;
use HTTP::Request;
use JSON;
use URI;

our @namespaces = qw( Person Movie );
for (@namespaces) {
    my $package = __PACKAGE_
eader( 'Accept' => 'application/json' );
    my $json_response = $self->{ua}->request($request);
    if ( $json_response->is_success ) {
        return decode_json $json_response->content();
    }
   
 else {
        croak
            sprintf( "%s returned by %s", $json_response->status_line, $url );
    }
}

# Checks items that will be sent to the API($input)
# $params - an array that identifies v
Selenium-Remote-Driver ( A/AI/AIVATURI/Selenium-Remote-Driver-0.15.tar.gz, AIVATURI, 2012; MetaCPAN )
Selenium-Remote-Driver/lib/Selenium/Remote/Driver.pm ( view source; MetaCPAN )

=head2 Remote Driver Response

Selenium::Remote::Driver uses the L<JsonWireProtocol|http://code.google.com/p/selenium/wiki/JsonWireProtocol> to communicate with the
Selenium Server. If an error oc
rver
sends back an HTTP error code with a JSON encoded reponse that indicates the
precise L<Response Error Code|http://code.google.com/p/selenium/wiki/JsonWireProtocol#Response_Status_Codes>. The mo
  $self->{javascript} = JSON::true;
        }
        else {
            $self->{javascript} = JSON::false;
        }
    }
    else {
        $self->{javascript} = JSON::true;
    }
    
  
WWW-Mailgun ( E/EL/ELBOW/WWW-Mailgun-0.4.tar.gz, ELBOW, 2012; MetaCPAN )
WWW-Mailgun/lib/WWW/Mailgun.pm ( view source; MetaCPAN )
package WWW::Mailgun;

use strict;
use warnings;

use JSON;
use MIME::Base64;

require LWP::UserAgent;

BEGIN {
    our $VERSION = 0.4;
}

sub new {
    my ($class, $param) = @_;

    my $Key = $param
tent_Type => 'multipart/form-data', Content => $msg);

    _handle_response($r);

    return from_json($r->decoded_content);
}

sub _get_route {
    my ($self, $path) = @_;

    if (ref $path eq 'ARRA
r = $self->{lc($method)}->($self,'unsubscribes',$data);
    _handle_response($r);
    return from_json($r->decoded_content);
}

sub complaints {
    my ($self, $method, $data) = @_;
    $method = $met
Module-Install ( A/AD/ADAMK/Module-Install-1.06.tar.gz, ADAMK, 2012; MetaCPAN )
Module-Install/lib/Module/Install/API.pod ( view source; MetaCPAN )
lt => 1,
    'File::ShareDir' => '1.00',
  );

  features(
    'JSON support', [
      -default => 0,
      'JSON' => '2.00',
      'JSON::XS' => '2.00',
    ],
    'YAML support', [
      'YAML' => '
r an
L<Inline>-based module. This writes C<Makefile>, C<META.yml>, and
C<MYMETA.yml> (or C<MYMETA.json>) if you set an experimental
environmental variable C<X_MYMETA>.

=head2 WriteMakefile (L<Module:
mymeta_json (L<Module::Install::Metadata>)

  write_mymeta_yaml;
  write_mymeta_json;

B<write_mymeta_yaml> command and B<write_mymeta_json> command are to
write C<MYMETA.yml> and C<MYMETA.json> respe
Module-Install ( A/AD/ADAMK/Module-Install-1.06.tar.gz, ADAMK, 2012; MetaCPAN )
Module-Install/lib/Module/Install/Metadata.pm ( view source; MetaCPAN )
mpFile('MYMETA.yml', $meta);
}

sub write_mymeta_json {
	my $self = shift;

	# We need JSON to write the MYMETA.json file
	unless ( eval { require JSON; 1; } ) {
		return 1;
	}

	# Generate the data
	
ta or return 1;

	# Save as the MYMETA.yml file
	print "Writing MYMETA.json\n";
	Module::Install::_write(
		'MYMETA.json',
		JSON->new->pretty(1)->canonical->encode($meta),
	);
}

sub _write_mymeta_da
Jemplate ( F/FR/FREW/Jemplate-0.262.tar.gz, FREW, 2012; MetaCPAN )
Jemplate/src/lib/Jemplate/Runtime/Compact.pm ( view source; MetaCPAN )
json_json2 {
    <<'...';
[% INCLUDE "js/json-json2.compact.js" %]
...
}

sub json_json2_internal {
    <<'...';
;(function(){

var JSON;

[% INCLUDE "js/json2.compact.js" %]

[% INCLUDE "js/json-json
-internal.compact.js" %]

}());
...
}

sub json_yui {
    <<'...';
[% INCLUDE "js/json-yui.compact.js" %]
...
}

sub json2 {
    <<'...';
[% INCLUDE "js/json2.compact.js" %]
...
}

sub xhr_gregory {
 
 METHODS

head2 kernel

head2 ajax_jquery

head2 ajax_xhr

head2 ajax_yui

head2 json_json2

head2 json_yui

head2 json2

head2 xhr_gregory

head2 xhr_ilinsky

head2 xxx

=head1 COPYRIGHT

Copyright (
Module-Install ( A/AD/ADAMK/Module-Install-1.06.tar.gz, ADAMK, 2012; MetaCPAN )
Module-Install/lib/Module/Install/WriteAll.pm ( view source; MetaCPAN )
 Experimental support for MYMETA
	if ( $ENV{X_MYMETA} ) {
		if ( $ENV{X_MYMETA} eq 'JSON' ) {
			$self->Meta->write_mymeta_json;
		} else {
			$self->Meta->write_mymeta_yaml;
		}
	}

	return 1;
}

1;
WWW-Mixcloud ( A/AJ/AJCT/WWW-Mixcloud-0.01.tar.gz, AJCT, 2012; MetaCPAN )
WWW-Mixcloud/lib/WWW/Mixcloud.pm ( view source; MetaCPAN )
I

package WWW::Mixcloud;

use Moose;
use namespace::autoclean;

use URI;
use LWP::UserAgent;
use JSON;
use DateTime::Format::Atom;
use Carp qw/ croak /;

use WWW::Mixcloud::Cloudcast;
use WWW::Mixclo
= $self->ua->get( $API_BASE . $uri->path );

    if ( $res->is_success ) { 
        return decode_json $res->content;
    }
    else {
        croak 'API error: ' . $res->content;
    }
}

1;

__END__
Template-Provider-Amazon-S3 ( G/GD/GDEY/Template-Provider-Amazon-S3-0.009.tar.gz, GDEY, 2012; MetaCPAN )
Template-Provider-Amazon-S3/lib/Template/Provider/Amazon/S3.pm ( view source; MetaCPAN )
S3::Client;
use DateTime;
use Try::Tiny;
use List::MoreUtils qw( uniq );
use CHI 0.50;
use JSON qw(decode_json);


sub _init {
    my ( $self, $options ) = @_;
    $self->{AWS_ACCESS_KEY_ID} = $option
WS_S3_TEMPLATE_CACHE_OPTIONS} && !$cache_opts ) {

        try {
            $cache_opts = decode_json( $ENV{TEMPLATE_CACHE_OPTIONS} );
        }
        catch {
            $cache_opts = undef;
     
t variable TEMPLATE_CACHE_OPTIONS. If using the environment 
   variable, the values need to be L<JSON>  encoded. Otherwise the value will be 
   an in memory store. The option send is the following:
Net-AMQP-PP ( B/BO/BOBTFISH/Net-AMQP-PP-0.01.tar.gz, BOBTFISH, 2012; MetaCPAN )
Net-AMQP-PP/lib/Net/AMQP/PP.pm ( view source; MetaCPAN )
package Net::AMQP::PP;
use strict;
use warnings;
use JSON ();

our $VERSION = '0.01';

my $data = JSON::from_json(
q[{"domain":{"delivery tag":{"type":"longlong"},"exchange name":{"type":"shortstr"},"
ApacheLog-Compressor ( T/TE/TEAM/ApacheLog-Compressor-0.005.tar.gz, TEAM, 2012; MetaCPAN )
ApacheLog-Compressor/lib/ApacheLog/Compressor.pm ( view source; MetaCPAN )
ple.com 105327 123.15.16.108 - apiuser@example.com [19/Dec/2009:03:12:07 +0000] "POST /api/status.json HTTP/1.1" 200 80516 "-" "-" "-"

The duration, IP, timestamp, method, HTTP version, response and 
x 0

=item * user packet - apiuser@example.com assigned index 0

=item * url packet - /api/status.json assigned index 0

=item * timestamp packet - since a busy server is likely to have several reques
YellowBot-API ( A/AB/ABH/YellowBot-API-0.96.tar.gz, ABH, 2012; MetaCPAN )
YellowBot-API/lib/YellowBot/API/Response.pm ( view source; MetaCPAN )
ellowBot::API::Response;
{
  $YellowBot::API::Response::VERSION = '0.96';
}
use Moose;
use JSON qw(decode_json);
use namespace::clean -except => 'meta';

has http => (
   is  => 'ro',
   isa => 'HTTP:
ine,
                };
    }
    my $data = decode_json($self->http->content);
    if ($ENV{API_DEBUG} and $ENV{API_DEBUG} > 2) {
        warn "JSON response:\n" . $self->http->content . "\n";
    }
Net-AMQP-PP ( B/BO/BOBTFISH/Net-AMQP-PP-0.01.tar.gz, BOBTFISH, 2012; MetaCPAN )
Net-AMQP-PP/maint/rebuild.pl ( view source; MetaCPAN )
File::ShareDir;
use JSON;
use FindBin qw/$Bin/;

Net::AMQP::Protocol->load_xml_spec(File::ShareDir::dist_dir("AnyEvent-RabbitMQ") . '/fixed_amqp0-8.xml');

my $data = JSON::to_json(\%Net::AMQP::Protoc
Module-Mask-Deps ( M/MA/MATTLAW/Module-Mask-Deps-0.07.tar.gz, MATTLAW, 2012; MetaCPAN )
Module-Mask-Deps/lib/Module/Mask/Deps.pm ( view source; MetaCPAN )
est suite to blow up if you require a module not listed as a
requirement in C<META.yml> or C<META.json>.

    perl Build.PL
    HARNESS_PERL_SWITCHES=-MModule::Mask::Deps ./Build test

Or use directly
rse::CPAN::Meta;

# Need to load these early in case we mask them later
use CPAN::Meta::YAML;
use JSON::PP;

use File::Spec::Functions qw(
    file_name_is_absolute
    updir
    splitdir
    abs2rel
et_deps

    @deps = $class->get_deps()

Returns current dependencies as defined in either C<META.json> or C<META.yml>,
checked in that order.  This is used internally by import and new, so there's
no
Jemplate ( F/FR/FREW/Jemplate-0.262.tar.gz, FREW, 2012; MetaCPAN )
Jemplate/tests/old/mangler/mangle.pl ( view source; MetaCPAN )
urp;
    if ($mode eq 'perl') {
        require JSON;
        my $json = JSON->new(); #pretty => 1, delimiter => 1);
        $context = $json->objToJson(eval $content );
    } else {
        #assume i
Jemplate ( F/FR/FREW/Jemplate-0.262.tar.gz, FREW, 2012; MetaCPAN )
Jemplate/src/lib/Jemplate/Runtime.pm ( view source; MetaCPAN )

}

sub json_json2 {
    <<'...';
[% INCLUDE "js/json-json2.js" %]
...
}

sub json_json2_internal {
    <<'...';
;(function(){

var JSON;

[% INCLUDE "js/json2.js" %]

[% INCLUDE "js/json-json2-intern
al.js" %]

}());
...
}

sub json_yui {
    <<'...';
[% INCLUDE "js/json-yui.js" %]
...
}

sub json2 {
    <<'...';
[% INCLUDE "js/json2.js" %]
...
}

sub xhr_gregory {
    <<'...';
[% INCLUDE "js/xhr-
 METHODS

head2 kernel

head2 ajax_jquery

head2 ajax_xhr

head2 ajax_yui

head2 json_json2

head2 json_yui

head2 json2

head2 xhr_gregory

head2 xhr_ilinsky

head2 xxx

=head1 COPYRIGHT

Copyright (
Jemplate ( F/FR/FREW/Jemplate-0.262.tar.gz, FREW, 2012; MetaCPAN )
Jemplate/lib/Jemplate.pod ( view source; MetaCPAN )
x.get('url/data.json');
    var elem = document.getElementById('some-div');
    elem.innerHTML = Jemplate.process('my-template.html', data);

or:

    var data = Ajax.get('url/data.json');
    var ele
r simply:

    Jemplate.process('my-template.html', 'url/data.json', '#some-div');

or, with jQuery.js:

    jQuery.getJSON("url/data.json", function(data) {
        Jemplate.process('my-template.html
g
the template code. Presto, we have full featured JavaScript
templating language!

Combined with JSON and xmlHttpRequest, Jemplate provides a really simple
and powerful way to do Ajax stuff.

=head1 

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