Group
Extension

Matches 35359

WWW-Scraper-WolframAlpha ( A/AV/AVAR/WWW-Scraper-WolframAlpha-0.001.tar.gz, AVAR, 2011; MetaCPAN )
WWW-Scraper-WolframAlpha/lib/WWW/Scraper/WolframAlpha.pm ( view source; MetaCPAN )
;
    use Any::Moose 'X::Getopt';
    use Any::Moose 'X::StrictConstructor';
    use URI;
    use JSON::XS;
    use WWW::Mechanize;

    our $VERSION = '0.01';

    with any_moose('X::Getopt::Dashes')
 = $mech->content;

        # Get the raw JSON string
        my ($json_string) = $cont =~ m[
            \Qcontext.jsonArray.popups.pod_0200.push(\E\ (?<json>\{.*?\}) \Q);\E
        ]xm;

        # D
ecode it into a Perl structure
        my $json = decode_json($json_string);
        my $reply = $json->{stringified};

        return $reply;
    }

    sub run {
        my ($self, $query) = @_;

  
App-htrepl ( F/FR/FRIEDO/App-htrepl-0.001_01.tar.gz, FRIEDO, 2011; MetaCPAN )
App-htrepl/lib/App/htrepl.pm ( view source; MetaCPAN )
shift;

    print { $self->{outfh} } <<'END';

htrepl commands:

.header Content-Type application/json    # set header
.header Content-Type                     # remove header

.cookie ID 12345       
Memcached-Client ( M/MD/MDORMAN/Memcached-Client-2.01.tar.gz, MDORMAN, 2011; MetaCPAN )
Memcached-Client/lib/Memcached/Client.pm ( view source; MetaCPAN )
itional Cache::Memcached hashing, both text and binary protocols,
serialization using Storable or JSON, and compression using gzip.

=head1 METHODS

=head2 new

C<new> takes a hash or a hashref contai
Net-OpenXchange ( M/MX/MXEY/Net-OpenXchange-0.001.tar.gz, MXEY, 2011; MetaCPAN )
Net-OpenXchange/lib/Net/OpenXchange/Module/User.pm ( view source; MetaCPAN )
    action  => 'list',
            columns => $self->columns
        ),
        Content => encode_json(\@ids),
    );

    my $res = $self->_send($req);
    return map { $self->class->thaw($_) } @{ $r
PowerDNS-API-Client ( A/AB/ABH/PowerDNS-API-Client-0.10.tar.gz, ABH, 2011; MetaCPAN )
PowerDNS-API-Client/lib/PowerDNS/API/Client/Response.pm ( view source; MetaCPAN )
::Response;
BEGIN {
  $PowerDNS::API::Client::Response::VERSION = '0.10';
}
use Moose;
use JSON qw(decode_json);
use namespace::clean -except => 'meta';

has http => (
    is       => 'ro',
    isa   
 1,
);

sub _build_data {
    my $self = shift;
    if ($self->http->content_type ne 'application/json') {
        if ($ENV{API_DEBUG}) {
            require Data::Dumper;
            warn "PowerDNS::
code,
            error       => $self->http->status_line,
        };
    }
    my $data = decode_json($self->http->decoded_content);
    $data->{http_status} = $self->http->code;
    if ($ENV{API_DEB
Net-OpenXchange ( M/MX/MXEY/Net-OpenXchange-0.001.tar.gz, MXEY, 2011; MetaCPAN )
Net-OpenXchange/lib/Net/OpenXchange/Types.pm ( view source; MetaCPAN )
(JSONXSBool JSONPPBool)];

use MooseX::Types::Moose qw(Bool);

class_type JSONXSBool, { class => 'JSON::XS::Boolean' };
class_type JSONPPBool, { class => 'JSON::PP::Boolean' };

coerce Bool, from JSON
XSBool, via { 0 + $_ };

coerce Bool, from JSONPPBool, via { 0 + $_ };

1;


__END__
=pod

=head1 NAME

Net::OpenXchange::Types - Moose type library for Net::OpenXchange

=head1 VERSION

version 0.001
WWW-Wordnik-API ( P/PS/PSILVA/WWW-Wordnik-API-v0.0.5.tar.gz, PSILVA, 2011; MetaCPAN )
WWW-Wordnik-API/lib/WWW/Wordnik/API.pm ( view source; MetaCPAN )
      => 'YOUR KEY HERE',
    API_FORMAT   => 'json',
    CACHE        => 10,
    DEBUG        => 0,
    MODULE_NAME  => 'WWW::Wordnik::API',
    USE_JSON     => 0,
};

sub _fields {
    {   server_ur
 API_FORMAT,
        cache       => CACHE,
        debug       => DEBUG,
        _formats    => { json => 1, xml => 1, perl => 1 },
        _versions   => { 1 => 0, 2 => 0, 3 => 1, 4 => 1 },
        _
 ),
        _json => USE_JSON,
    };
}

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

    my $self = bless( _fields(), $class );

    eval { require JSON; JSON->import() };
    $self->{_json} = 'availabl
Horris ( A/AA/AANOAA/Horris-v0.1.2.tar.gz, AANOAA, 2011; MetaCPAN )
Horris/lib/App/Horris/CLI/Command/me2day.pm ( view source; MetaCPAN )
package App::Horris::CLI::Command::me2day;
# ABSTRACT: me2day Watcher


use Moose;
use DBI;
use JSON;
use AnyEvent;
use File::Temp;
use LWP::Simple;
use Const::Fast;
use DateTime::Format::W3CDTF;
use 
extends 'MooseX::App::Cmd::Command';

const my $URL_FORMAT => "http://me2day.net/api/get_posts/%s.json";

has database => (
    is            => 'ro',
    isa           => 'Str',
    traits        => 
             my $json_url = sprintf $URL_FORMAT, $id;
                print "Checking $json_url\n";
                my $data    = get $json_url;
                my $content = from_json($data);
       
Dancer-Plugin-FormattedOutput ( A/AJ/AJKALD/Dancer-Plugin-FormattedOutput-0.01.tar.gz, AJKALD, 2011; MetaCPAN )
Dancer-Plugin-FormattedOutput/lib/Dancer/Plugin/FormattedOutput.pm ( view source; MetaCPAN )
ormats
    JSON_FT  => "json",
    XML_FT   => "xml",
    YAML_FT  => "yaml",
    TEXT_FT  => "text",
    HTML_FT  => "html",

    # Content Types
    JSONP_CT => "text/javascript",
    JSON_CT  => "a
pplication/json",
    XML_CT   => 'text/xml',
    YAML_CT  => 'application/yaml',
    TEXT_CT  => "text/plain",
};

=head1 SYNOPSIS

Similar in functionality to the standard Dancer serialisation routi
a format using templates

=item Allows per-call configuration of default format

=item Works with jsonp

=back

    use Dancer::Plugin::FormattedOutput;

    get '/some/route' => sub {
        my $dat
Net-OpenXchange ( M/MX/MXEY/Net-OpenXchange-0.001.tar.gz, MXEY, 2011; MetaCPAN )
Net-OpenXchange/lib/Net/OpenXchange/X/OX.pm ( view source; MetaCPAN )
rror_params},
        });

Net::OpenXchange::X::OX is an exception class which is thrown when the JSON
response body from OpenXchange indicates an error.

=head1 ATTRIBUTES

=head2 error

Required, th
Document-Transform ( N/NP/NPEREZ/Document-Transform-1.110530.tar.gz, NPEREZ, 2011; MetaCPAN )
Document-Transform/lib/Document/Transform.pm ( view source; MetaCPAN )
ument? Then this module
will help you get that pony you've always wanted.

Consider the following JSON document:

    {
        "document_id": "QWERTY1",
        "foo": "bar",
        "yarg":
        
HTML-Tested-JavaScript ( B/BO/BOSU/HTML-Tested-JavaScript-0.30.tar.gz, BOSU, 2011; MetaCPAN )
HTML-Tested-JavaScript/lib/HTML/Tested/JavaScript/Variable.pm ( view source; MetaCPAN )
use HTML::Tested::JavaScript::Serializer;
use JSON::XS;

sub encode_value {
	my ($self, $val) = @_;
	no warnings 'numeric';
	my $d = $val + 0;
	return JSON::XS->new->allow_nonref->encode($val eq $d ? 
HTML-Tested-JavaScript ( B/BO/BOSU/HTML-Tested-JavaScript-0.30.tar.gz, BOSU, 2011; MetaCPAN )
HTML-Tested-JavaScript/lib/HTML/Tested/JavaScript/Serializer.pm ( view source; MetaCPAN )
es =~ s#;//\]\]>\n</script>.*##s) if $res;
	return $res;
}

sub Extract_JSON {
	my ($n, $str) = @_;
	my $et = Extract_Text($n, $str) // return;
	return JSON::XS->new->allow_nonref->decode($et);
}

1;
Net-OpenXchange ( M/MX/MXEY/Net-OpenXchange-0.001.tar.gz, MXEY, 2011; MetaCPAN )
Net-OpenXchange/lib/Net/OpenXchange/X/HTTP.pm ( view source; MetaCPAN )
 is an exception class used for errors on the HTTP
level that occur before decoding OpenXchange's JSON response body.

=head1 ATTRIBUTES

=head2 request

Required, instance of L<HTTP::Request|HTTP::Re
CloudApp-REST ( M/MD/MDIETRICH/CloudApp-REST-0.02.tar.gz, MDIETRICH, 2011; MetaCPAN )
CloudApp-REST/lib/CloudApp/REST.pm ( view source; MetaCPAN )
pp::REST;

use Moose;
use MooseX::Types::URI qw(Uri);

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use Module::Load;
use Data::Dumper;

=head1 NAME

CloudApp::REST - Perl Interface to the Clo
my $req = HTTP::Request->new;
        $req->header(Accept => 'application/json');
        $req->content_type('application/json');
        $req->uri($uri);

        $req->method('GET');
        if (%bo
->_debug("Have content, method will be POST");

            my $body_json = encode_json \%body;
            $req->content($body_json);
            $req->method('POST');
        }
        if (defined $
Horris ( A/AA/AANOAA/Horris-v0.1.2.tar.gz, AANOAA, 2011; MetaCPAN )
Horris/lib/Horris/Connection/Plugin/Eval.pm ( view source; MetaCPAN )
package Horris::Connection::Plugin::Eval;
# ABSTRACT: Evaluate Plugin on Horris


use Moose;
use JSON;
use URI::Escape;
use HTTP::Request;
use LWP::UserAgent;
extends 'Horris::Connection::Plugin';
wit
=> $uri);
    my $res = $ua->request($req);
    if ($res->is_success) {
        my $scalar = JSON::from_json($res->content, { utf8  => 1 });
        return $scalar->{stderr} eq '' ? $scalar->{stdout} 
Net-OpenXchange ( M/MX/MXEY/Net-OpenXchange-0.001.tar.gz, MXEY, 2011; MetaCPAN )
Net-OpenXchange/lib/Net/OpenXchange/Connection.pm ( view source; MetaCPAN )
mespace::autoclean;

# ABSTRACT: Connection to OpenXchange server

use HTTP::Request::Common;
use JSON;
use LWP::UserAgent;
use Net::OpenXchange::X::HTTP;
use Net::OpenXchange::X::OX;
use URI;

has ur
eq,
                response => $res,
            }
        );
    }

    my $resdataref = decode_json($res->content);

    if ($resdataref->{error}) {
        Net::OpenXchange::X::OX->throw(
        
ded
as well.

=head2 send

    my $resdata = $conn->send($req);

Send the request and decodes the JSON response body. If there is an error, it
throws L<Net::OpenXchange::X::HTTP|Net::OpenXchange::X::H
CatalystX-Controller-ExtJS-REST-SimpleExcel ( P/PE/PERLER/CatalystX-Controller-ExtJS-REST-SimpleExcel-0.1.1.tar.gz, PERLER, 2011; MetaCPAN )
CatalystX-Controller-ExtJS-REST-SimpleExcel/lib/CatalystX/Controller/ExtJS/REST/SimpleExcel.pm ( view source; MetaCPAN )
traits => 'CatalystX::Controller::ExtJS::REST::SimpleExcel::Trait';
use strict;
use warnings;
use JSON::XS ();

after list => sub {
    my ($self, $c) = @_;
    return unless($c->request->accepts('app
       $rcopy = $rcopy->{$1};
            }
            push(@row, ref $rcopy->{$hcopy} ? JSON::XS::encode_json($rcopy->{$hcopy}) : $rcopy->{$hcopy} );
        }
        push(@rows, \@row);
    }
    
App-Pebble ( J/JO/JOHANL/App-Pebble-0.008-TRIAL.tar.gz, JOHANL, 2011; MetaCPAN )
App-Pebble/lib/App/Pebble/Helpers/DateTime/Duration.pm ( view source; MetaCPAN )
ration helpers.

=head1 DESCRIPTION

Support DateTime::Duration "natively" by making sure they TO_JSON-ify
properly, and provide some useful extra helper methods.

=cut

package App::Pebble::Helpers::


no warnings "redefine";

=head2 METHODS

=cut

# Needed by Pebble::Object and JSON::XS
sub DateTime::Duration::TO_JSON {
    my $self = shift;
    ###TODO: replace with format duration
    $self->in
Acme-eng2kor ( A/AA/AANOAA/Acme-eng2kor-v0.0.2.tar.gz, AANOAA, 2011; MetaCPAN )
Acme-eng2kor/lib/Acme/eng2kor.pm ( view source; MetaCPAN )
orean Translator


use utf8;
use Any::Moose;
use Any::Moose '::Util::TypeConstraints';
use JSON qw/decode_json/;
use Const::Fast;
use URI::Escape qw/uri_escape_utf8/;
use HTTP::Request;
use HTTP::Resp
src . '|' . $self->dst);
    my $json = $self->get_json($escaped_uri);
    $self->translated($json->{responseData}{translatedText});
    return $json;
}


sub get_json {
    my ($self, $url) = @_;
   
 = $ua->request($req);
    die $res->status_line, "\n" unless $res->is_success;
    return decode_json($res->content);
}

__PACKAGE__->meta->make_immutable;


1;

__END__
=pod

=encoding utf-8

=head1

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