Group
Extension

Matches 35358

Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Process.pm ( view source; MetaCPAN )
********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::Process - A JSON/ExtDirect interface to operations on processes

=head1 SYNOPSIS

    use Zenoss;
    my $api = Ze
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Catalyst-Engine-Stomp ( P/PM/PMOONEY/Catalyst-Engine-Stomp-0.17.tar.gz, PMOONEY, 2011; MetaCPAN )
Catalyst-Engine-Stomp/lib/Catalyst/Controller/MessageDriven.pm ( view source; MetaCPAN )
 used to serialiser/deserialise. See Data::Serializer to see
what is available. Defaults to YAML. JSON is anotther that is available.


=cut

class_type 'Data::Serializer';
my $serializer_t = subtype 
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss.pm ( view source; MetaCPAN )
>meta->make_immutable;
no Moose;

1;

__END__

=head1 NAME

Zenoss - Perl interface to the Zenoss JSON API

=head1 SYNOPSIS

    use Zenoss;
    use Data::Dumper;

    # Create a Zenoss object
    my 
ponse is now an instance of Zenoss::Response
    # now we can do things like
    print $response->json();
    print $response->http_code();

    # get the response in a perl reference
    my $ref = $r
 severity of 0,1,2,3,4 or 5
    my $events = $api->events_query(
        {
            history => JSON::true,
            params  => {
                severity => [0,1,2,3,4,5],
            }
        
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Examples.pod ( view source; MetaCPAN )

=pod

=head1 NAME

Examples covering the Zenoss JSON API

=head1 OVERVIEW

This page serves as collection of some quick examples designed to get one started.  I will
try to add more occasionally.

=h
eviceName  => 'newdevice',
            deviceClass => '/Server/Linux',
            model       => JSON::true,
        }
    );
    
    # Print the JobID that this device will be processed under
    m
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router.pm ( view source; MetaCPAN )
package Zenoss::Router;
use strict;
use File::Find;
use File::Basename;
use JSON qw{};
use LWP::UserAgent;
use HTTP::Request::Common qw{POST};

use Moose;
use Moose::Util qw {apply_all_roles};
use Zen
***************************************************************
our $JSON_CONTENT_TYPE;     *JSON_CONTENT_TYPE = \q{application/json; charset=utf-8};

#************************************************
ease the transaction counter
    $self->_increase_transaction_count;

    # Build JSON request in HASHREF
    my $JSON_DATA = {
        action  => $args->{'action'},
        method  => $args->{'method
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Connector.pm ( view source; MetaCPAN )
me API methods
    my $response = $api->device_getDevices();
    
    # Print the JSON return
    print $response->json;

=head1 DESCRIPTION

This module creates a connection to the Zenoss API, and te
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/ZenPack.pm ( view source; MetaCPAN )
********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::ZenPack - A JSON/ExtDirect interface to operations on ZenPacks

=head1 SYNOPSIS

    use Zenoss;
    my $api = Zen
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Report.pm ( view source; MetaCPAN )
*********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::Report - A JSON/ExtDirect interface to operations on reports

=head1 SYNOPSIS

    use Zenoss;
    my $api = Zeno
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Template.pm ( view source; MetaCPAN )
*************************************************
# Name:         Template.pm
#
# Description:  A JSON/ExtDirect interface to operations on templates
#
# Author:       Patrick Baker
#
# Version:      

    # Argument definition
    my $definition = {
        defaults    => {
            query   => JSON::null,
        }
    };

    # Check the args
    $self->_check_args($args, $definition);

    # 

    # Argument definition
    my $definition = {
        defaults    => {
            query   => JSON::null,
        },
        required    => ['uid'],
    };

    # Check the args
    $self->_check_
Text-TEI-Collate ( A/AU/AURUM/Text-TEI-Collate-2.1.tar.gz, AURUM, 2011; MetaCPAN )
Text-TEI-Collate/lib/Text/TEI/Collate.pm ( view source; MetaCPAN )
de qw( decode_utf8 );
use File::Temp;
use Graph::Easy;
use IPC::Run qw( run binary );
use JSON qw( decode_json );
use Module::Load;
use Text::CSV_XS;
use Text::TEI::Collate::Diff;
use Text::TEI::Colla
( $xml_file ) )
  }
  $aligner->align( @manuscripts );

  # Read from a JSON input.
  @manuscripts = $aligner->read_source( $JSON_string );
  $aligner->align( @manuscripts );
  
=head1 DESCRIPTION

Te
ay title for the collation output results, should those
results need a display title (e.g. TEI or JSON output).

=item B<language> - Specify the language module we should use from those
available in T
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/benchmark/decode_type.pl ( view source; MetaCPAN )
{
#	require JSON::PP;
#	$benchmarks{'JSON::PP int'} = sub{JSON::PP::encode_json("9627")};
#} or warn "Unable to require JSON::PP";

eval {
	require JSON::XS;
	JSON::XS->import('encode_json');
	my $arr
y = encode_json(["hello", 9627]);
	my $bool = "[true]";
	my $float = encode_json([3.14]);
	my $hash = encode_json({"hello" => 9627});
	my $int = encode_json([9627]);
	my $null = encode_json([undef]);
ode_json(["hello"]);
	$benchmarks{'JSON::XS int'} = sub {JSON::XS::decode_json($int)};
	$benchmarks{'JSON::XS bool'} = sub {JSON::XS::decode_json($bool)};
	$benchmarks{'JSON::XS float'} = sub {JSON::X
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Service.pm ( view source; MetaCPAN )
finition
    my $definition = {
        defaults    => {
            history => JSON::false,
            limit   => JSON::null,
            uid     => '/zport/dmd'
        }
    };

    # Check the ar
********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::Service - A JSON/ExtDirect interface to operations on services

=head1 SYNOPSIS

    use Zenoss;
    my $api = Zen
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/benchmark/decode.pl ( view source; MetaCPAN )
equire JSON::PP;
	my $encoded = JSON::PP::encode_json($structure);
	$benchmarks{'JSON::PP'} = sub{JSON::PP::decode_json($encoded)};
} or warn "Unable to require JSON::PP";

eval {
	require JSON::XS;
	
my $encoded = JSON::XS::encode_json($structure);
	$benchmarks{'JSON::XS'} = sub{JSON::XS::decode_json($encoded)};
} or warn "Unable to require JSON::XS";

eval {
	require Convert::Bencode;
	my $encode
Text-TEI-Collate ( A/AU/AURUM/Text-TEI-Collate-2.1.tar.gz, AURUM, 2011; MetaCPAN )
Text-TEI-Collate/lib/Text/TEI/Collate/Word.pm ( view source; MetaCPAN )
string - the initial word string that should be parsed into its forms

=item *

json - a hash, presumably read from JSON, that has all the attributes

=item *

empty - a flag to say that this should b

ok( !$word->is_empty, "Word is not empty");

# Initialize a word from a JSON string, check its values
use JSON qw( decode_json );
my $jstring = encode_utf8( '{"c":"Արդ","n":"արդ","punctuation":
"Առդ"}' );
$word = Text::TEI::Collate::Word->new( json => decode_json($jstring), ms_sigil => 'B' );
is( $word->word, 'Առդ', "Got correct JSON word before modification" );
is( $word->canonical_fo
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/benchmark/encode.pl ( view source; MetaCPAN )
e JSON::PP;
	$benchmarks{'JSON::PP'} = sub{JSON::PP::encode_json($structure)};
} or warn "Unable to require JSON::PP";

eval {
	require JSON::XS;
	$benchmarks{'JSON::XS'} = sub{JSON::XS::encode_json($
structure)};
} or warn "Unable to require JSON::XS";

eval {
	require Convert::Bencode;
	$benchmarks{'Convert::Bencode'} = sub{Convert::Bencode::bencode($structure)};
} or warn "Unable to require Conv
WWW-USF-Directory ( D/DO/DOUGDUDE/WWW-USF-Directory-0.003001.tar.gz, DOUGDUDE, 2011; MetaCPAN )
WWW-USF-Directory/ex/email_autocomplete.pl ( view source; MetaCPAN )
xing
	Directory;

use 5.008;
use strict;
use warnings 'all';

use parent 'CGI::Application';

use JSON 2.00; # The API was changed
use Try::Tiny;
use WWW::USF::Directory;

sub setup {
	my ($self) = @_
ults and response
	my (@results, $response);

	# Set the header to specity JSON
	$self->header_add(-type => 'application/json');

	try {
		# Search the directory
		@results = $self->{directory}->searc
il } } @results;

		# Return the JSON-encoded results to print
		$response = JSON->new->encode(\@results);
	}
	catch {
		# Return an empty JSON list
		$response = JSON->new->encode([]);
	};

	# Return
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Device.pm ( view source; MetaCPAN )
n = {
        defaults    => {
            updates     => JSON::false,
            deletion    => JSON::false,
            sendevent   => JSON::false,
            sort        => 'name',
            di

    # Argument definition
    my $definition = {
        defaults    => {
            monitor => JSON::false,
            start   => 0,
            limit   => 50,
            sort    => 'name',
     
n = {
        defaults    => {
            updates     => JSON::false,
            deletion    => JSON::false,
            sendEvent   => JSON::false,
            start       => 0,
            limit  
EntityModel-Web-PSGI ( T/TE/TEAM/EntityModel-Web-PSGI-0.002.tar.gz, TEAM, 2011; MetaCPAN )
EntityModel-Web-PSGI/lib/EntityModel/Web/PSGI.pm ( view source; MetaCPAN )
b definition
 my $model = EntityModel->new->add_plugin(Web => {
 })->load_from(JSON => {
   file => $ENV{ENTITYMODEL_JSON_MODEL}
 });
 # Create the PSGI wrapper
 my $app = EntityModel::Web::PSGI->new;
AnyMQ-AMQP ( C/CL/CLKAO/AnyMQ-AMQP-0.30.tar.gz, CLKAO, 2011; MetaCPAN )
AnyMQ-AMQP/lib/AnyMQ/Trait/AMQP.pm ( view source; MetaCPAN )
yMQ::Trait::AMQP;
use Moose::Role;
use File::ShareDir;

use AnyEvent;
use AnyEvent::RabbitMQ;
use JSON;
use Try::Tiny;
use Carp qw(croak carp);

has host => (is => "ro", isa => "Str");
has port => (is
er}->method_frame->routing_key;
        try { $self->topics->{$topic}->AnyMQ::Topic::publish(JSON::from_json($payload)) }
        catch { croak "failed to republsih on $topic: $_" };
    };
}

sub new
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/foo.pl ( view source; MetaCPAN )
use strict;
use warnings;
use JSON;
use Text::TNetstrings qw(:all);
use Benchmark qw(cmpthese);
my $structure = {
	'resources' => {
		'license' => [
			'http://opensource.org/licenses/mit-license.php'
y $tn = encode_tnetstrings($structure);
my $json = encode_json($structure);
print "TNetstrings (" . length($tn) . ")
$tn

JSON (" . length($json) . ")
$json
";

cmpthese(-10, {
	'TNetstrings' => sub{d
ecode_tnetstrings(encode_tnetstrings($structure))},
	'JSON' => sub{decode_json(encode_json($structure))},
});


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