Group
Extension

Matches 35359

Ipernity-API ( W/WN/WNEESSEN/Ipernity-API-0.10.tar.gz, WNEESSEN, 2011; MetaCPAN )
Ipernity-API/lib/Ipernity/API.pm ( view source; MetaCPAN )
ommunicate with the API and returns the results in the 3
possible formats (provided by Ipernity): JSON, XML, SOAP, XML-RPC

=head1 METHODS

=over 4

=item B<new>( configuration arguments )

The constr
HTML-CTPP2 ( S/ST/STELLAR/HTML-CTPP2-2.6.7.tar.gz, STELLAR, 2011; MetaCPAN )
HTML-CTPP2/lib/HTML/CTPP2.pm ( view source; MetaCPAN )
   * HASH_ELEMENT
    * HREF_PARAM
    * HTMLESCAPE
    * ICONV
    * IN_SET
    * JSESCAPE
    * JSON
    * LIST_ELEMENT
    * LOG
    * MD5
    * MAX
    * MB_SIZE
    * MB_SUBSTR
    * MB_TRUNCATE
parameters to undef.

  $T -> clear_params();
  or
  $T -> reset();

=head2 json_param() - set some parameters

  $T -> json_param('{ "foo": "bar", "baz" : 123}');

=head2 output() - returns output as
HTML-CTPP2 ( S/ST/STELLAR/HTML-CTPP2-2.6.7.tar.gz, STELLAR, 2011; MetaCPAN )
HTML-CTPP2/CTPP2.xs ( view source; MetaCPAN )
P2ErrorCodes.h>
#include <CTPP2Exception.hpp>
#include <CTPP2FileSourceLoader.hpp>
#include <CTPP2JSONParser.hpp>
#include <CTPP2Logger.hpp>
#include <CTPP2Parser.hpp>
#include <CTPP2ParserException.h
	// Reset parameters
	int reset();

	// Reset parameters
	int clear_params();

	// Emit JSON parameters
	int json_param(SV * pParams);

	// Get output
	SV * output(Bytecode      * pBytecode,
	        


// Emit JSON parameters
int CTPP2::json_param(SV * pParams)
{
	using namespace CTPP;

	long eSVType = SvTYPE(pParams);

	STRLEN        iJSONLen = 0;
#ifdef SvPV_const
	const char  * szJSON   = NULL;
Test-Apache-RewriteRules ( H/HA/HATENA/Test-Apache-RewriteRules-1.0.1.tar.gz, HATENA, 2010; MetaCPAN )
Test-Apache-RewriteRules/lib/Test/Apache/RewriteRules.pm ( view source; MetaCPAN )
::Apache::RewriteRules;
use 5.008001;
use strict;
use warnings;
use Carp qw(croak);

use JSON::XS qw(decode_json);
use Path::Class qw(dir file);
use File::Temp qw(tempfile);

use LWP::UserAgent;
use H
r = <<"EOS";
#!/usr/bin/env perl
use strict;
use warnings;
use JSON::XS;

print "Content-Type: application/json;\\n\\n";
print encode_json({
    host            => \$ENV{HTTP_HOST},
    path          
>header('Location') if $res->header('Location');
    }
    else {
        $result = eval { decode_json($res->content) };
        die $@ if $@;
        $result->{code} = $code;
        $result->{host} 
WebService-VaultPress-Partner ( S/SY/SYMKAT/WebService-VaultPress-Partner-0.05.tar.gz, SYMKAT, 2011; MetaCPAN )
WebService-VaultPress-Partner/lib/WebService/VaultPress/Partner.pm ( view source; MetaCPAN )
::Request::History;
use WebService::VaultPress::Partner::Request::Usage;
use Moose;
use Carp;
use JSON;
use LWP;
use Moose::Util::TypeConstraints;

my $abs_int = subtype as 'Int', where { $_ >= 0 };

>_croak_on_http_error( $res );

    my $json = decode_json( $res->content );
    
    # The API tells us if the call failed.
    die $json->{reason} unless $json->{status};

    return WebService::Vau
new(
        api_call        => 'CreateGoldenTicket',
        ticket          => exists $json->{url}    ? $json->{url} : "",
    );
}

sub get_usage {
    my ( $self, %request ) = @_;
    
    my $req
Config-JFDI ( R/RO/ROKR/Config-JFDI-0.065.tar.gz, ROKR, 2011; MetaCPAN )
Config-JFDI/lib/Config/JFDI.pm ( view source; MetaCPAN )
y/application/my_application_local.{yml,yaml,cnf,conf,jsn,json,...} AND

    path/to/my/application/my_application.{yml,yaml,cnf,conf,jsn,json,...}

... and load the found configuration information ap
I18N-Handle ( C/CO/CORNELIUS/I18N-Handle-0.051.tar.gz, CORNELIUS, 2010; MetaCPAN )
I18N-Handle/lib/I18N/Handle.pm ( view source; MetaCPAN )
ing json files

B<not implemented yet>

Ensure you have json files:

    json/en.json
    json/fr.json
    json/ja.json

Then specify the C<json> option:

    $hl = I18N::Handle->new( json => 'json' )
Net-Twitpic ( H/HE/HEDWIG/Net-Twitpic-0.01.tar.gz, HEDWIG, 2010; MetaCPAN )
Net-Twitpic/lib/Net/Twitpic.pm ( view source; MetaCPAN )
Twitpic;

use warnings;
use strict;
use utf8;

use LWP::UserAgent;
use HTTP::Request::Common;
use JSON;
use Net::OAuth;
our $DYNAMIC_FILE_UPLOAD = 1;

=head1 NAME

Net::Twitpic - The great new Net::Tw
		request_method => 'GET',
		request_url => 'https://api.twitter.com/1/account/verify_credentials.json'
	);
	$oauth_sign->sign;
	my %uploadparams = (
		'key' => $self->{'twitpic_api'},
		'message' => 
ps://api.twitter.com/1/account/verify_credentials.json',
		'Content-Type' => 'form-data'
	);
	my $request = POST('http://api.twitpic.com/2/upload.json',\%uploadparams,%req_headers);
	$self->{r} = $sel
WWW-Lovefilm-API ( P/PM/PMOONEY/WWW-Lovefilm-API-0.13.tar.gz, PMOONEY, 2010; MetaCPAN )
WWW-Lovefilm-API/lib/WWW/Lovefilm/API.pm ( view source; MetaCPAN )
NOPSIS

  use WWW::Lovefilm::API;
  use XML::Simple;
  use Data::Dumper;
  use URI::Escape;
  use JSON;

  my %auth = Your::Custom::getAuthFromCache();

  my $lovefilm = WWW::Lovefilm::API->new({
    
 $auth{access_secret},
    user_id         => $auth{user_id},

    content_filter => sub { decode_json(shift) },  # optional
  });

  if( ! $auth{user_id} ){
    my %data = $lovefilm->RequestToken();
HTTP-AppServer ( K/KI/KITOMER/HTTP-AppServer-0.04.tar.gz, KITOMER, 2010; MetaCPAN )
HTTP-AppServer/lib/HTTP/AppServer/Plugin/FileRetriever.pm ( view source; MetaCPAN )
 document root.
# 2010 by Tom Kirchner

use 5.010000;
use strict;
use warnings;
use IO::File;
use JSON;
use Path::Trim;
use HTTP::AppServer::Plugin;
use base qw(HTTP::AppServer::Plugin);

our $VERSION
JavaScript-Writer ( G/GU/GUGOD/JavaScript-Writer-0.3.1.tar.gz, GUGOD, 2010; MetaCPAN )
JavaScript-Writer/lib6/JavaScript/Writer.pm ( view source; MetaCPAN )
 {
                    $ret ~= %s{'object'} ~ ".";
                }
                # Should use JSON to build arglist.
                my $args = %s{'args'}.join(",");
                $ret ~= %s{'ca
WebService-8tracks ( M/MO/MOTEMEN/WebService-8tracks-0.01.tar.gz, MOTEMEN, 2010; MetaCPAN )
WebService-8tracks/lib/WebService/8tracks.pm ( view source; MetaCPAN )
ION = '0.01';

use WebService::8tracks::Session;
use WebService::8tracks::Response;

use JSON::XS qw(decode_json);
use URI::Escape qw(uri_escape uri_escape_utf8);
use HTTP::Request;

our @CARP_NOT = (


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

    my $url = "http://api.8tracks.com/$path.json";
    if ($qparam) {
        if (ref $qparam eq 'HASH' && scalar keys %$qparam) {
            my 
->password);
    }

    my $res = $self->user_agent->request($req);
    my $api_response = decode_json $res->content;
    return WebService::8tracks::Response->new($api_response);
}

=head1 METHODS

=
Template-Benchmark ( S/SG/SGRAHAM/Template-Benchmark-1.09_01.tar.gz, SGRAHAM, 2010; MetaCPAN )
Template-Benchmark/lib/Template/Benchmark.pm ( view source; MetaCPAN )
mark> and gives you human-readable reports
as a reply rather than a raw hashref, it also supports JSON output if
you want to dump the report somewhere in a machine-readable format.

If you have no tem
WebService-8tracks ( M/MO/MOTEMEN/WebService-8tracks-0.01.tar.gz, MOTEMEN, 2010; MetaCPAN )
WebService-8tracks/README.pod ( view source; MetaCPAN )
ION = '0.01';

use WebService::8tracks::Session;
use WebService::8tracks::Response;

use JSON::XS qw(decode_json);
use URI::Escape qw(uri_escape uri_escape_utf8);
use HTTP::Request;

our @CARP_NOT = (


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

    my $url = "http://api.8tracks.com/$path.json";
    if ($qparam) {
        if (ref $qparam eq 'HASH' && scalar keys %$qparam) {
            my 
->password);
    }

    my $res = $self->user_agent->request($req);
    my $api_response = decode_json $res->content;
    return WebService::8tracks::Response->new($api_response);
}

=head1 METHODS

=
HTTP-AppServer ( K/KI/KITOMER/HTTP-AppServer-0.04.tar.gz, KITOMER, 2010; MetaCPAN )
HTTP-AppServer/lib/HTTP/AppServer/Plugin/JsonCrud.pm ( view source; MetaCPAN )
package HTTP::AppServer::Plugin::JsonCrud;
# Plugin for HTTP::AppServer that provides CRUD methods for
# storing JSON documents in a DBI (relational) database.
# 2010 by Tom Kirchner

################
se DBI;
use JSON;
use HTTP::AppServer::Plugin;
use base qw(HTTP::AppServer::Plugin);

our $VERSION = '0.01';

# database connection settings
my $DBEngine   = 'mysql';
my $DBName     = 'jsondb';
my $DB
ot';
my $DBPassword = '';
my $DBHost     = 'localhost';

# database settings
my $DBTablePrefix = 'jsondb_';

# UUID generator instance
my $UUIDGenerator = Data::UUID->new();

# called by the server wh
JavaScript-Writer ( G/GU/GUGOD/JavaScript-Writer-0.3.1.tar.gz, GUGOD, 2010; MetaCPAN )
JavaScript-Writer/lib/JavaScript/Writer.pm ( view source; MetaCPAN )
self->{statements} }, { code => args };
        return self;
    },
    '""' => \&as_string;

use JSON::Syck;

our $VERSION = '0.3.1';

use Sub::Exporter -setup => {
    exports => ['js'],
    groups 
v)
        }
        return "{" . join (",", map { JSON::Syck::Dump($_) . ":" . $ret{$_} } sort keys %ret) . "}";
    }
    else {
        return JSON::Syck::Dump($obj)
    }
}

sub as_string {
    my
 given in
perl's native form, you don't need to use L<JSON> module to serialized
it first.  (Unless, of course, that's your purpose: to get a JSON
string in JavaScript.)

=item var( $name, [ $value ] 
HTTP-AppServer ( K/KI/KITOMER/HTTP-AppServer-0.04.tar.gz, KITOMER, 2010; MetaCPAN )
HTTP-AppServer/lib/HTTP/AppServer.pm ( view source; MetaCPAN )
RUD server for JSON objects and plain files.
# 2010 by Tom Kirchner
# 
# routes:
#   POST /create = erzeugt neues JSON-Dokument, liefert UUId zurueck
#   GET  /read/<uuid> = liefert JSON-Dokument oder
 Fehler zurueck
#   POST /update/<uuid> = aendert JSON-Dokument (erzeugt neue Revision)
#   GET  /delete/<uuid> = loescht JSON-Dokument
#   GET  /file/<filename> = gibt Datei innerhalb Document-Root z
JavaScript-Writer ( G/GU/GUGOD/JavaScript-Writer-0.3.1.tar.gz, GUGOD, 2010; MetaCPAN )
JavaScript-Writer/lib/JavaScript/Writer/Var.pm ( view source; MetaCPAN )
ackage JavaScript::Writer::Var;
use strict;
use warnings;

our $VERSION = '0.0.2';

use self;
use JSON::Syck;

sub new {
    my ($class, $ref, $params) = @_;
    tie $$ref, $class, $$ref, $params;
   
~ (/^JavaScript::Writer/)) {
        $v = self->{value}->as_string;
    }
    else {
        $v = JSON::Syck::Dump( self->{value} );
    }

    $v =~ s/\.?;?$/;/;
    my $s = self->{name} . " = $v" ;
le assignement, it'll be written
as a javascript assignment too. Only the value are dumped with
C<JSON::Syck>.

=back

=head1 AUTHOR

Kang-min Liu  C<< <gugod@gugod.org> >>


=head1 LICENCE AND COPYRI
Web-API-Mapper ( C/CO/CORNELIUS/Web-API-Mapper-0.04.tar.gz, CORNELIUS, 2010; MetaCPAN )
Web-API-Mapper/lib/Web/API/Mapper.pm ( view source; MetaCPAN )
... } );

    1;

For example, if you are in Dancer:

    #!/usr/bin/perl
    use Dancer;
    use JSON;

    our $m = Web::API::Mapper->new
        ->mount( '/twitter' => Twitter::API->route )
       
AnyEvent-FriendFeed-Realtime ( M/MI/MIYAGAWA/AnyEvent-FriendFeed-Realtime-0.05.tar.gz, MIYAGAWA, 2010; MetaCPAN )
AnyEvent-FriendFeed-Realtime/lib/AnyEvent/FriendFeed/Realtime.pm ( view source; MetaCPAN )
 strict;
use 5.008_001;
our $VERSION = '0.05';

use AnyEvent;
use AnyEvent::HTTP;
use Encode;
use JSON;
use MIME::Base64;
use Scalar::Util;
use URI;
use URI::QueryParam;

sub new {
    my($class, %arg
_poll->() unless $body;
            my $res = eval { JSON::decode_json($body) } || do {
                ($args{on_error} || sub { die @_ })->("JSON parsing error: $@");
                return;
       
ent::FriendFeed::Realtime is an AnyEvent consumer that subscribes
to FriendFeed Real-time API via JSON long-poll.

=head1 AUTHOR

Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt>

=head1 LICENSE

Th

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