Group
Extension

Matches 35358

WebService-Buxfer ( N/NH/NHEINRIC/WebService-Buxfer-0.01.tar.gz, NHEINRIC, 2009; MetaCPAN )
WebService-Buxfer/lib/WebService/Buxfer.pm ( view source; MetaCPAN )
'rw', isa => 'Bool', default => 1 );
has 'data_format' => ( is => 'ro', isa => 'Str', default => 'json' );
has 'debug' => ( is => 'rw', isa => 'Bool', default => 0 );
has 'userid' => ( is => 'ro', isa
WebService-Buxfer ( N/NH/NHEINRIC/WebService-Buxfer-0.01.tar.gz, NHEINRIC, 2009; MetaCPAN )
WebService-Buxfer/lib/WebService/Buxfer/Response.pm ( view source; MetaCPAN )
package WebService::Buxfer::Response;

use Moose;
use JSON::XS ();
use Carp qw(carp);

has 'raw_response' => (
    is      => 'ro',
    isa     => 'Object',
    handles => [ qw( status_code status_mes
t = $self->raw_response->content;
    return {} unless $content;

    my $obj;
    return JSON::XS::decode_json( $content );
}

sub ok {
    my $self = shift;
    my $status = $self->buxfer_status;
  
er::Response->new(
        $lwp_ua->request(
            GET 'https://www.buxfer.com/transactions.json?token=XXX'
        )
        );

    exit 1 unless $response->ok;

    foreach ( $response->conte
Hyper ( A/AC/ACID/Hyper-v0.05.tar.gz, ACID, 2009; MetaCPAN )
Hyper/lib/Hyper/Application.pm ( view source; MetaCPAN )
lication;

use strict;
use warnings;
use version; our $VERSION = qv('0.01');

use Class::Std;
use JSON::XS 2.01;

my %flow_control_of :ATTR(:name<flow_control> :default<()>);
my %viewstate_of    :ATTR
flow_control && $viewstate ) {
        $flow_control->restore_state_recursive(
            decode_json(
                $viewstate_of{ident $self} = $viewstate
            )
        );
    }

    retu
 = $flow_control->get_state_recursive();

    if ( ref $viewstate ) {
        $viewstate = encode_json($viewstate);
    }

    return $viewstate_of{$ident} = $viewstate;
}

1;

__END__

=pod

=head1 N
DB-CouchDB-Schema ( Z/ZA/ZAPHAR/DB-CouchDB-Schema-0.3.04_remove_blib.tar.gz, ZAPHAR, 2008; MetaCPAN )
DB-CouchDB-Schema/lib/DB/CouchDB.pm ( view source; MetaCPAN )
package DB::CouchDB;

use warnings;
use strict;
use JSON -convert_blessed_universally;
use LWP::UserAgent;
use URI;
use Encode;

$DB::CouchDB::VERSION = 0.2;

=head1 NAME

    DB::CouchDB - A low leve
_;
    $opts{port} = 5984
        if (!exists $opts{port});
    my $obj = {%opts};
    $obj->{json} = JSON->new();
    return bless $obj, $class; 
}

=head2 Accessors

=over 4

=item *

host - host na


=item *

json - the JSON object for serialization

=back

=cut

sub host {
    return shift->{host};
}

sub port {
    return shift->{port};
}

sub db {
    return shift->{db};
}

sub json {
    my 
DB-CouchDB-Schema ( Z/ZA/ZAPHAR/DB-CouchDB-Schema-0.3.04_remove_blib.tar.gz, ZAPHAR, 2008; MetaCPAN )
DB-CouchDB-Schema/script/functional.pl ( view source; MetaCPAN )
te db response is: ", $/, $conn->json()->encode($resp), $/;

my $resp = $conn->create_doc('mb_test', {foo => 'bar'});
print "create doc response is: ", $/, $conn->json()->encode($resp), $/;
my $respOb
", $/, $conn->json()->encode($resp), $/;
$respObj = $resp;

$respObj->{bleh} = 'blah';

$resp = $conn->update_doc('mb_test', $id, $respObj);
print "update response is: ", $/, $conn->json()->encode($re
al get doc response is: ", $/, $conn->json()->encode($resp), $/;
my $rev = $resp->{_rev};
$resp = $conn->all_dbs();
print "all dbs response is: ", $/, $conn->json()->encode($resp), $/;

$resp = $conn-
DB-CouchDB-Schema ( Z/ZA/ZAPHAR/DB-CouchDB-Schema-0.3.04_remove_blib.tar.gz, ZAPHAR, 2008; MetaCPAN )
DB-CouchDB-Schema/lib/DB/CouchDB/Schema.pm ( view source; MetaCPAN )
schema_from_db();
    }
}

=head2 load_schema_from_script($script)

loads a CouchDB Schema from a json script file. This is sort of like the DDL
in a SQL DB only its essentially just a list of _design
hema_from_script {
    my $self = shift;
    my $script = shift;
    $self->schema($self->server->json->decode($script));
    return $self;
}

=head2 load_schema_from_db()

Loads a CouchDB Schema from
et_doc($docname);
        push @docs, $doc;
    }
    $db->json->pretty([$pretty]);
    my $script = $db->json->encode(\@docs);
    $db->json->pretty([undef]);
    return $script;
}

sub _mk_view_acce
Bot-BasicBot-Pluggable-Module-Collection ( K/KI/KITANO/Bot-BasicBot-Pluggable-Module-Collection-0.01.tar.gz, KITANO, 2008; MetaCPAN )
Bot-BasicBot-Pluggable-Module-Collection/lib/Bot/BasicBot/Pluggable/Module/PathtraqPageCounter.pm ( view source; MetaCPAN )
ot::Pluggable::Module::PathtraqPageCounter;

use strict;
use warnings;
use Readonly;
use URI;
use JSON;
use LWP::UserAgent;
use Data::Dumper;

use base qw(Bot::BasicBot::Pluggable::Module);

Readonly 
 ( $self, $url ) = @_;
    my $res = $self->_get($url);
    my $content = $res->is_success ? from_json( $res->content ) : undef;
    return $content->{count} if $content;
}

sub _get {
    my ( $self,
my $uri = URI->new( $API_BASE_URL . '/page_counter' );
    my $params = {};
    $params->{api} = 'json';
    $params->{url} = $url;
    $uri->query_form($params);
    $uri;
}

sub _create_reply_messag
DB-CouchDB-Schema ( Z/ZA/ZAPHAR/DB-CouchDB-Schema-0.3.04_remove_blib.tar.gz, ZAPHAR, 2008; MetaCPAN )
DB-CouchDB-Schema/lib/DB/CouchDB/Schema/Edit.pm ( view source; MetaCPAN )
r(), $/;
        return;
    }
    VIEW: while (my $doc = $test->next()) {
        print $server->json->encode($doc);
        my $stop;
        $self->get_response('Continue viewing results?[Y/n]', su
WWW-HatenaStar ( W/WO/WOREMACX/WWW-HatenaStar-0.04.tar.gz, WOREMACX, 2008; MetaCPAN )
WWW-HatenaStar/lib/WWW/HatenaStar.pm ( view source; MetaCPAN )
Class::Accessor::Fast);
__PACKAGE__->mk_accessors(qw(error));

use WWW::HatenaLogin;
use URI;
use JSON::Syck 'Load';
use Scalar::Util qw(blessed);
use Time::HiRes qw(sleep);

sub new {
    my ($class,
   }

    my $count = exists($data->{count}) ? $data->{count} : 0;

    my $res = $self->_entries_json($data->{uri});
    return undef unless $res;

    if ($count) {
        my $wait = exists($opt->{
f->_star_add_json($data);
            return undef unless $res;
            sleep($wait);

            $callback->($cur, $max) if $callback;
        }

        $res = $self->_entries_json($data->{uri}
Template-Plugin-ForumCode ( C/CH/CHISEL/Template-Plugin-ForumCode-0.0.5.tar.gz, CHISEL, 2008; MetaCPAN )
Template-Plugin-ForumCode/lib/HTML/ForumCode/Cookbook.pod ( view source; MetaCPAN )
thod(s) to add to your own controller to ForumCodify some text and return
the marked up HTML in a JSON response.

This is useful as part of a solution to provide in-page edit-preview toggling
(via YUI
Template-Plugin-ForumCode ( C/CH/CHISEL/Template-Plugin-ForumCode-0.0.5.tar.gz, CHISEL, 2008; MetaCPAN )
Template-Plugin-ForumCode/lib/HTML/ForumCode/Cookbook/Recipe1.pod ( view source; MetaCPAN )
 et sw=4 sr sta
    use strict;
    use warnings;
    use parent 'Catalyst::Controller';

    use JSON::Any;
    use HTML::ForumCode;

    sub preview : Local {
        my ($self, $c) = @_;
        my

        my $msg_source = $c->request->param('msg_source');

        my $j = JSON::Any->new;
        my $json = $j->to_json(
            {
                'formatted' =>
                    $tt_forum-
         $msg_source
                    )
            }
        );

        $c->response->body( $json );
        return;
    }

    1;

=head1 DESCRIPTION

This recipe provides a L<Catalyst> controll
Net-Twitter-Search ( S/SH/SHINY/Net-Twitter-Search-0.11.tar.gz, SHINY, 2008; MetaCPAN )
Net-Twitter-Search/lib/Net/Twitter/Search.pm ( view source; MetaCPAN )
base qw/Net::Twitter/;
use URI::Escape;

our $VERSION = '0.11';
#http://search.twitter.com/search.json?q=<query>

sub search {
    my $self = shift;
    my $query = shift;
    my $params = shift || {}
de = $params->{'since'} || undef;

    #build URL
    my $url = 'http://search.twitter.com/search.json?q=' . URI::Escape::uri_escape($query) .'&page='. $page;
    $url .= '&lang=' . URI::Escape::uri_e
nless $req->is_success;
    return [] if $req->content eq 'null';

    #decode the json
    my $res = JSON::Any->jsonToObj($req->content) ;

    return $res->{'results'};

}


1;

=head1 NAME

Net::Tw
App-CamelPKI ( G/GR/GRM/CamelPKI/App-CamelPKI-0.07.tar.gz, GRM, 2008; MetaCPAN )
App-CamelPKI/lib/App/CamelPKI/Certificate.pm ( view source; MetaCPAN )
=cut

use Test::More qw(no_plan);
use Test::Group;
use File::Slurp;
use App::CamelPKI::Error;
use JSON;

my $certificate = <<"CERTIFICATE";
-----BEGIN CERTIFICATE-----
MIICsDCCAhmgAwIBAgIJANdqtXzdPS/1
#TODO: verifier pourquoi ca marche pas
#    try {
#        App::CamelPKI::Certificate->parse(JSON::from_json("null"));
#        fail;
#    } catch App::CamelPKI::Error::Internal with {
#        pass;
App-CamelPKI ( G/GR/GRM/CamelPKI/App-CamelPKI-0.07.tar.gz, GRM, 2008; MetaCPAN )
App-CamelPKI/lib/App/CamelPKI/PEM.pm ( view source; MetaCPAN )
App::CamelPKI::Error::Internal("ABSTRACT_METHOD")
        if ($class eq __PACKAGE__);

    # Some JSON objects stringify to undef!  In this case, Perl
    # converts them into the null string, with a 
App-CamelPKI ( G/GR/GRM/CamelPKI/App-CamelPKI-0.07.tar.gz, GRM, 2008; MetaCPAN )
App-CamelPKI/lib/App/CamelPKI/CertTemplate.pm ( view source; MetaCPAN )
e JSON;
    sub Bogus::Template::list_keys { qw(foo bar main) };

    my %got = Bogus::Template->App::CamelPKI::CertTemplate::normalize_opts
         (bar => [ qw( ba pa pa ) ],
         foo => JSON::
from_json('"yourself"'),
         main => "screen",
         turn => "on");
    is_deeply(\%got, {
                      foo => "yourself",
                      bar => [qw(ba pa pa)],
               
App-CamelPKI ( G/GR/GRM/CamelPKI/App-CamelPKI-0.07.tar.gz, GRM, 2008; MetaCPAN )
App-CamelPKI/lib/App/CamelPKI/Controller/CA.pm ( view source; MetaCPAN )
given certificate template.

Actions with name ending by C<_pem> don't use L<App::CamelPKI::View::JSON>,
but rather transmit directly their data in text/plain; this enables
operation with very basic c
App-HistHub ( T/TY/TYPESTER/App-HistHub-0.01.tar.gz, TYPESTER, 2008; MetaCPAN )
App-HistHub/lib/App/HistHub/Web/Controller/API.pm ( view source; MetaCPAN )
c->res->status(500);
        $c->stash->{json} = {
            error => $last_error,
        };
        $c->error(0);
    }
    else {
        $c->stash->{json} = {
            result => $self->result
 || '',
            error  => $self->error || '',
        };
    }

    $c->forward( $c->view('JSON') );
}

=head1 AUTHOR

Daisuke Murase

=head1 LICENSE

This library is free software, you can redist
App-HistHub ( T/TY/TYPESTER/App-HistHub-0.01.tar.gz, TYPESTER, 2008; MetaCPAN )
App-HistHub/lib/App/HistHub.pm ( view source; MetaCPAN )
SION = '0.01';

use POE qw/
    Wheel::FollowTail
    Component::Client::HTTPDeferred
    /;

use JSON::XS ();
use HTTP::Request::Common;
use Fcntl ':flock';

has hist_file => (
    is       => 'rw',
Client::HTTPDeferred->new;
    },
);

has json_driver => (
    is      => 'rw',
    isa     => 'JSON::XS',
    lazy    => 1,
    default => sub {
        JSON::XS->new->latin1;
    },
);

has poll_del
session, $data) = @_;

    my $json = $self->json_driver->decode($data);
    if ($json->{error}) {
        warn 'api poll error: '. $json->{error};
    }
    elsif ($json->{result}) {
        $self->{
App-CamelPKI ( G/GR/GRM/CamelPKI/App-CamelPKI-0.07.tar.gz, GRM, 2008; MetaCPAN )
App-CamelPKI/lib/App/CamelPKI/Controller/Test.pm ( view source; MetaCPAN )
lated).

=head2 json_helloworld

Accepts a JSON parameter which contains an associative table with keys
"nom" (meaning last name in French) and "prenom" (first name), and
returns a JSON parameter whic
For the fame of it,
"Bonjour" means "Hello" in French.)

=cut

sub json_helloworld : Local : ActionClass("+App::CamelPKI::Action::JSON") {
    my ($self, $c, $input) = @_;
    $c->stash->{salutation} 
l that the HTTP/S client is wielding (deduced from its client
certificate in L<App::CamelPKI>). A JSON request is not needed, allowing
the use of C<curl> in command-line mode for testing purposes.

=c
App-CamelPKI ( G/GR/GRM/CamelPKI/App-CamelPKI-0.07.tar.gz, GRM, 2008; MetaCPAN )
App-CamelPKI/lib/App/CamelPKI/Controller/CA/Template/Base.pm ( view source; MetaCPAN )
plate controller> is an entry point into Camel-PKI : it consists
of the code that responds to the JSON-RPC requests for issuing or
revoking certificates.  Other user-initiated Certification Authority
d2 certifyJSON($reqdetails) : Local : ActionClass("+App::CamelPKI::Action::JSON")

Requests the issuance of a number of certificates in this template
family.  $reqdetails (passed as the JSON-RPC POST 
the same call to
I<certify> throws an exception.

The response is transmitted as an C<application/json> HTTP document,
with the following structure (again in Perl syntax):

  {
     keys => [
        

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