Group
Extension

Matches 35358

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
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) = @_;

  
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/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
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
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 ? 
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
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":
        
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/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
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/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
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
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
MARC-Utils-MARC2Pairs ( B/BB/BBAXTER/MARC-Utils-MARC2Pairs-0.02.tar.gz, BBAXTER, 2011; MetaCPAN )
MARC-Utils-MARC2Pairs/lib/MARC/Utils/MARC2Pairs.pm ( view source; MetaCPAN )
 object to a Data::Pairs structure and
back.

The resulting structure may be serialized, e.g., as JSON or YAML.

=head1 SEE ALSO

MARC::Record
Data::Pairs

=head1 AUTHOR

Brad Baxter, E<lt>bbaxter@cpa
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/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);
       
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} 
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2/Menu.pm ( view source; MetaCPAN )
THODS

=head2 new()

Object constructor.

=head2 TO_JSON()

Returns HashRef that is possible to give to C<encode_json()> function.

=cut

sub TO_JSON {
    my $self = shift;

    return {
        map 
Chart-OFC2 ( J/JK/JKUTEJ/Chart-OFC2-0.08_02.tar.gz, JKUTEJ, 2011; MetaCPAN )
Chart-OFC2/lib/Chart/OFC2.pm ( view source; MetaCPAN )
(
        'title'  => 'Bar chart test',
    );
    print $chart->render_swf(600, 400, 'chart-data.json', 'test-chart');

OFC2 bar chart data:

    use Chart::OFC2;
    use Chart::OFC2::Axis;
    use C
lash
Chart 2 is offering. But it should help you to starting creating OFC2
graphs quite fast. The JSON format is quite intuitive and can be created
from any hash. This module is more like guideline.

2 is a flash script for creating graphs. To have a graph we need an
F<open-flash-chart.swf> and a JSON data file describing graph data.
Complete examples you can find after successful run of this modu

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