Group
Extension

Matches 35359

CGI-JSONRPC ( C/CR/CRAKRJACK/CGI-JSONRPC-0.11.tar.gz, CRAKRJACK, 2008; MetaCPAN )
CGI-JSONRPC/lib/CGI/JSONRPC/Dispatcher/Session.pm ( view source; MetaCPAN )
#!perl
package CGI::JSONRPC::Dispatcher::Session;

use strict;
use warnings;
our $AUTOLOAD;

return 1;

sub AUTOLOAD {
    my($jsonrpco, $id, $to) = splice(@_, 0, 3);
    (my $method = $AUTOLOAD) =~ s
   my $object = $to->jsonrpc_new($id,$jsonrpco->{session});
    return unless $object;
    my $result = $object->$method(@_);
    $object->_jsonrpc_finish() if $object->can('_jsonrpc_finish');
    ret
=head1 NAME

CGI::JSONRPC::Session::Dispatcher - Dispatch JSONRPC requests to persistant objects

=head1 SYNOPSIS

package Hello;
use CGI::JSONRPC::Session::Obj;
use base qw(CGI::JSONRPC::Session::Obj
R-Writer ( D/DM/DMAKI/R-Writer-0.00001.tar.gz, DMAKI, 2008; MetaCPAN )
R-Writer/lib/R/Writer/Encoder.pm ( view source; MetaCPAN )
served.

package R::Writer::Encoder;
use strict;
use warnings;

use JSON::XS (); # XXX - Remove this in the future?
our $CODER = JSON::XS->new->allow_nonref;

sub new    { bless \my $c, shift }
sub en
CatalystX-ListFramework ( S/SN/SNAFUFANS/CatalystX-ListFramework-0.5.tar.gz, SNAFUFANS, 2008; MetaCPAN )
CatalystX-ListFramework/lib/CatalystX/ListFramework.pm ( view source; MetaCPAN )
n files and your L<DBIx::Class> Catalyst
model. A search form is also supplied, which can include JSON-powered
ExtJS comboboxes (see L<http://www.extjs.com/>).

To run the included demo application, g
      ...
            
=item infobox_order



=back

=head1 TEMPLATES

Documentation TODO

=head1 JSON

Documentation TODO

=cut

our %LOADED; # cache of eval'ed formdefs

sub new {
    my ($class, $t
) = @_;
    confess if (!$view);
    return @{$self->{formdef}->{display}->{$view}};
}

sub stash_json_autocomplete {
    my ($self, $query, $id_field, $show_field, $restrict) = @_;

    my $searchcol
CGI-JSONRPC ( C/CR/CRAKRJACK/CGI-JSONRPC-0.11.tar.gz, CRAKRJACK, 2008; MetaCPAN )
CGI-JSONRPC/lib/CGI/JSONRPC/Session/Obj.pm ( view source; MetaCPAN )
package CGI::JSONRPC::Session::Obj;
use strict;

our @IGNORE_KEYS = qw( _session _cgi _request );

1;

sub jsonrpc_new {
    my($class, $dispatcher, $id, $session,%options) = @_;
    warn __PACKAGE__ 
ill not be possible.";
    my $session_key = "jsonrpc_$id";
    if ($session and my $data = $session->param($session_key)) {
      my $self = $class->_jsonrpc_restore($data);
      $self->{_session} =
->{jsonrpc_ignore_keys} = [@IGNORE_KEYS];
      return $self;
      #return bless $self, $class;
    } else {
      return bless { id => $id,_session => $session, _session_key => $session_key, jsonrpc
CatalystX-Example-YUIUploader ( R/RK/RKRIMEN/CatalystX-Example-YUIUploader-0.02.tar.gz, RKRIMEN, 2008; MetaCPAN )
CatalystX-Example-YUIUploader/lib/CatalystX/Example/YUIUploader/Controller/Root.pm ( view source; MetaCPAN )
            uri => "$localfile_uri",
        };
    }
    }

    $catalyst->stash->{json}->{uploads} = \@uploads,;
    $catalyst->forward("View::JSON");
}

sub end : ActionClass('RenderView') {
}

1;
R-Writer ( D/DM/DMAKI/R-Writer-0.00001.tar.gz, DMAKI, 2008; MetaCPAN )
R-Writer/lib/R/Writer.pm ( view source; MetaCPAN )
re functions, execute loops.
Probably need way to handle datasets.

=item Remove JavaScript-ness

JSON and what not are probably not needed.

=item Document Way To Feed The Script To "R"

=back

=head
JSON-XS-VersionOneAndTwo ( L/LB/LBROCARD/JSON-XS-VersionOneAndTwo-0.31.tar.gz, LBROCARD, 2008; MetaCPAN )
JSON-XS-VersionOneAndTwo/benchmarks/json_xs_1.pl ( view source; MetaCPAN )
JSON::XS;

my $data = {
    'three' => [ 1, 2, 3 ],
    'four' => { 'a' => 'b' },
    'five' => [ 'a', 'b', 'c' ],
};
my $json = to_json($data);

cmpthese(
    -1,
    {   'to_json'   => sub { to_json
($data) },
        'from_json' => sub { from_json($json) },
    }
);
JSON-XS-VersionOneAndTwo ( L/LB/LBROCARD/JSON-XS-VersionOneAndTwo-0.31.tar.gz, LBROCARD, 2008; MetaCPAN )
JSON-XS-VersionOneAndTwo/benchmarks/versiononeandtwo.pl ( view source; MetaCPAN )
rk qw(cmpthese);
use JSON::XS::VersionOneAndTwo;

my $data = {
    'three' => [ 1, 2, 3 ],
    'four' => { 'a' => 'b' },
    'five' => [ 'a', 'b', 'c' ],
};
my $json = encode_json($data);

cmpthese(
 
   -1,
    {   'encode_json' => sub { encode_json($data) },
        'decode_json' => sub { decode_json($json) },
    }
);
WebService-Yelp ( J/JD/JDR/WebService-Yelp-0.03.tar.gz, JDR, 2008; MetaCPAN )
WebService-Yelp/lib/WebService/Yelp.pm ( view source; MetaCPAN )
age WebService::Yelp;

use strict;
use warnings;

our $VERSION = '0.03';

use LWP::UserAgent;
use JSON;
use Scalar::Util qw/looks_like_number/;

use WebService::Yelp::Result;
use WebService::Yelp::Nei
f->base_url() || $base_url);
  $self->{_uri} = $uri;

  # set up the json parser
  my $json = JSON->new();
  $self->{_json} = $json;
  return $self;
}


my %cmap = (
            # review search
      
hat is returned by the API. The default is
WebService::Yelp::* objects. Other options are 'php', 'json', and
'pickle'. If one of these three options is specified, the raw data
will be returned by the 
Geo-Query-LatLong ( R/RE/RETOH/Geo/Geo-Query-LatLong-0.8011.tar.gz, RETOH, 2008; MetaCPAN )
Geo-Query-LatLong/lib/Geo/Query/LatLong.pm ( view source; MetaCPAN )
(%) {
	my $self = shift;
	my %args = @_;
	$args{'location'} ||= '';

	eval 'use JSON::Syck; 1' or print STDERR "ERR JSON::Syck is missing\n";
	use Encode;
	# use URI;

	my $uri = URI->new("http://maps
.google.com/maps/geo");
	   $uri->query_form(q => $args{'location'}, output => 'json', key => $self->{'apikey'});

	my $res = $ua->get($uri);

	# Content-Type: text/javascript; charset=UTF-8; charset=
e::decode($charset, $res->content);

	local $JSON::Syck::ImplicitUnicode = 1;
	1 if defined $JSON::Syck::ImplicitUnicode; # prevent warning
	my $data = JSON::Syck::Load($content);

	my @placemark = @{
JSON-XS-VersionOneAndTwo ( L/LB/LBROCARD/JSON-XS-VersionOneAndTwo-0.31.tar.gz, LBROCARD, 2008; MetaCPAN )
JSON-XS-VersionOneAndTwo/benchmarks/json_xs_2.pl ( view source; MetaCPAN )
;
use JSON::XS;

my $data = {
    'three' => [ 1, 2, 3 ],
    'four' => { 'a' => 'b' },
    'five' => [ 'a', 'b', 'c' ],
};
my $json = encode_json($data);

cmpthese(
    -1,
    {   'encode_json' => s
ub { encode_json($data) },
        'decode_json' => sub { decode_json($json) },
    }
);
WWW-HatenaDiary ( K/KE/KENTARO/WWW-HatenaDiary-0.02.tar.gz, KENTARO, 2008; MetaCPAN )
WWW-HatenaDiary/lib/WWW/HatenaDiary.pm ( view source; MetaCPAN )

use warnings;
use Carp;
use URI;
use Web::Scraper;
use WWW::Mechanize;
use WWW::HatenaLogin;
use JSON::Syck 'Load';

our $VERSION = '0.02';

sub new {
    my ($class, $args) = @_;
    my $base     = 
 get_rkm {
    my $self = shift;
    my $rkm;

    $self->{login}->mech->get("$self->{diary}?mode=json");
    eval {
        $rkm = Load($self->{login}->mech->content)->{rkm};
    };

    $rkm;
}

sub
e entry is required')
        if !$args->{uri};

    $self->{login}->mech->get("$args->{uri}?mode=json");
    Load($self->{login}->mech->content);
}

sub retrieve_day {
    my ($self, $args) = @_;

  
Net-SocialGraph ( S/SI/SIMONW/Net-SocialGraph-1.1.tar.gz, SIMONW, 2008; MetaCPAN )
Net-SocialGraph/lib/Net/SocialGraph.pm ( view source; MetaCPAN )
package Net::SocialGraph;

use strict;
use JSON::Any;
use LWP::Simple qw();
use URI;

our $VERSION = '1.1';

my $url = 'http://socialgraph.apis.google.com/lookup';

=head1 NAME

Net::SocialGraph - int
turning reachable nodes.

=item pretty (boolean)

Pretty-print returned JSON.

=item callback (string matching /^[\w\.]+$/)

JSONP callback function. 

You shouldn't ever have to use this but I put it
@_;
    my $json = $self->get_json(@urls) || return undef;
    return JSON::Any->jsonToObj($json);

}

=head2 get_json <uri[s]>

The same as above but returns raw JSON.

=cut

sub get_json {
    my $s
Hatena-Star-Mobile ( J/JK/JKONDO/Hatena-Star-Mobile-0.01.tar.gz, JKONDO, 2008; MetaCPAN )
Hatena-Star-Mobile/lib/Hatena/Star/Mobile.pm ( view source; MetaCPAN )
ar::Mobile;
use strict;
use warnings;
use URI::Escape;
use LWP::UserAgent;
use HTTP::Request;
use JSON::Syck;

our $VERSION = '0.01';

my $add_template =
    '<a href="%sstar.add?sid=%s&rks=%s&uri=%s&
a.com';
    my $sbase = sprintf('http://s.%s/', $hatena_domain);
    my $suri = $sbase . 'entries.json?';
    if ($args{sid}) {
        $suri .= sprintf('sid=%s&', $args{sid});
    }
    my $count = 0
ri);
        my $res = $ua->request($req);
        $res->is_success or return;
        my $data = JSON::Syck::Load($res->content);
        $sentries = $data->{entries};
    }
    for my $se (@$sentrie
XML-FeedPP-Plugin-DumpJSON ( K/KA/KAWASAKI/XML-FeedPP-Plugin-DumpJSON-0.33.tar.gz, KAWASAKI, 2008; MetaCPAN )
XML-FeedPP-Plugin-DumpJSON/lib/XML/FeedPP/Plugin/DumpJSON.pm ( view source; MetaCPAN )
gin::DumpJSON - FeedPP Plugin for generating JSON

=head1 SYNOPSIS

    use XML::FeedPP;
    my $feed = XML::FeedPP->new( 'index.rss' );
    $feed->limit_item( 10 );
    $feed->call( DumpJSON => 'inde
ates a JSON data representation.

=head1 FILE OR STRING

If a JSON filename is C<undef> or C<''>, this module returns a JSON 
string instead of generating a JSON file.

    $feed->call( DumpJSON => 'f
eed.json' );     # generates a JSON file
    my $json = $feed->call( 'DumpJSON' );       # returns a JSON string

=head1 OPTIONS

This plugin allows some optoinal arguments following:

    my %opt = (
Net-Digg ( K/KW/KWILMS/Net-Digg-0.11.tar.gz, KWILMS, 2007; MetaCPAN )
Net-Digg/lib/Net/Digg.pm ( view source; MetaCPAN )
ilms <wilms@cs.umn.edu>';
$VERSION     = 0.11;
use warnings;
use strict;

use LWP::UserAgent;
use JSON::Any;

=head1 NAME

Net::Digg - Quickly consume and interface with the Digg API.

=head1 SYNOPSIS
'http%3A%2F%2Fsearch.cpan.org%2Fdist%2FNet-Digg' unless defined $conf{appkey};
    $conf{type} = 'json' unless defined $conf{type};
    $conf{ua} = LWP::UserAgent->new();
    $conf{ua}->agent($conf{us
dle_args($queryargs);
    my $req = $self->{ua}->get($url);
    return ($req->is_success) ?  JSON::Any->jsonToObj($req->content) : undef;
}

=pod

=head2 get_popular_stories (\%params)

Given

=over

HTTP-Proxy-GreaseMonkey ( A/AN/ANDYA/HTTP-Proxy-GreaseMonkey-0.05.tar.gz, ANDYA, 2007; MetaCPAN )
HTTP-Proxy-GreaseMonkey/lib/HTTP/Proxy/GreaseMonkey.pm ( view source; MetaCPAN )
ad3 Performance

C<GM_setValue>, C<GM_getValue> and C<GM_log> talk to the proxy using
synchronous JSONRPC - so they're a little slow. It remains to be seen
whether this is a problem for typical Grease
shift;
    my $h = $self->{_html} ||= HTML::Tiny->new;
    return 'var GM__global = '
      . $h->json_encode(
        {
            host     => $self->{uri}->host,
            passthru => $self->get_
}
    
    req.open(method, url, async);
    req.send(data);
}

// From http://www.JSON.org/json2.js
function GM__jsonEncode(value) {
    var m = {    // table of character substitutions
        '\b':
HTTP-Proxy-GreaseMonkey ( A/AN/ANDYA/HTTP-Proxy-GreaseMonkey-0.05.tar.gz, ANDYA, 2007; MetaCPAN )
HTTP-Proxy-GreaseMonkey/lib/HTTP/Proxy/GreaseMonkey/Redirector.pm ( view source; MetaCPAN )
package HTTP::Proxy::GreaseMonkey::Redirector;

use warnings;
use strict;
use Carp;
use JSON;
use HTTP::Response;
use HTML::Tiny;
use YAML qw( DumpFile LoadFile );
use LockFile::Simple qw( lock unlock
h_internal {
    my ( $self, $headers, $message, $query ) = @_;
    my $result = eval {
        # JSON == YAML, right?
        my %handler = (
            setValue => sub {
                my ( $args,
{_html} ||= HTML::Tiny->new;
        my $qs   = $h->url_decode( $query );
        my $args = from_json( $qs );

        my $method = delete $args->{m}
          || die "Missing 'm' arg";
        my $c
HTTP-Proxy-GreaseMonkey ( A/AN/ANDYA/HTTP-Proxy-GreaseMonkey-0.05.tar.gz, ANDYA, 2007; MetaCPAN )
HTTP-Proxy-GreaseMonkey/lib/HTTP/Proxy/GreaseMonkey/Script.pm ( view source; MetaCPAN )
 = map { $h->json_encode( $_ ) } ( $self->namespace, $self->name );

    return join "\n", map {
            "function GM_$_() { return GM__proxyFunction("
          . join( ', ', $h->json_encode( $_ 
WebService-OkiLab-ExtractPlace ( T/TS/TSUKAMOTO/WebService-OkiLab-ExtractPlace-0.02.tar.gz, TSUKAMOTO, 2007; MetaCPAN )
WebService-OkiLab-ExtractPlace/lib/WebService/OkiLab/ExtractPlace.pm ( view source; MetaCPAN )
arp;

our $VERSION = 0.02;

use HTTP::Request::Common qw(GET POST);
use LWP::UserAgent;
use JSON;

sub new {
	my $class = shift;
	my $self  = bless {}, $class;
	$self->url('http://okilab.jp
', $res->status_line));
	# parse result
	my $json = $res->content() || return $self->error('Response content is empty.');
	my $result = jsonToObj($json) || return $self->error("Can't parse response
item Can't parse response content.

It occurs when the response content is not able to parse as JSON data.
Please confirm the content of the HTTP::Request object by res().

=back

=head1 CONFIG

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