t/|
Makefile\.PL$|
README$|
MANIFEST$|
Changes$|
META\.json$|
META\.yml$|
[^\/]+\.xs$
)}x }
}
sub prune_files {
my $self = shift;
akefile\.PL$|
README$|
MANIFEST$|
Changes$|
META\.json$|
META\.yml$|
\.xs$
)}x
=head1 AUTHOR
Robert Krimen <robertkrim
);
use Garivini::DB;
use Garivini::Client;
use Gearman::Client;
use Gearman::Worker;
use JSON;
use constant DEBUG => 0;
sub new {
my Garivini::Controller $self = shift;
$self = fiel
$sm_client = $self->{sm_client};
my $gm_client = $self->{gm_client};
my $sm_job = decode_json(${$gm_job->argref});
DEBUG && warn "Got a job $sm_job->{funcname}\n";
# NOTE: This passe
ng.h>
#define NEED_newRV_noinc
#define NEED_sv_2pv_flags
#include "ppport.h"
typedef yajl_handle JSON__YAJL__Parser;
int DEBUG = 0;
void callback_call(SV* hashref, unsigned int index) {
HV* has
ose,
callback_array_open,
callback_array_close,
};
MODULE = JSON::YAJL::Parser PACKAGE = JSON::YAJL::Parser
JSON::YAJL::Parser new(package, unsigned int allowComments = 0, unsigned int
);
RETVAL = parser;
OUTPUT:
RETVAL
void parse(JSON::YAJL::Parser parser, SV* data)
CODE:
const char * jsonText;
unsigned int jsonTextLength;
yajl_status status;
unsigned char
use strict;
use warnings;
use Blitz;
use Blitz::API;
use Blitz::Validate;
use MIME::Base64;
use JSON::XS;
use LWP;
use Storable qw(dclone);
=head1 NAME
Blitz::Exercise - Superclass for Sprint and
stdlib.h>
#include <string.h>
#define NEED_newSVpvn_flags
#include "ppport.h"
typedef yajl_gen JSON__YAJL__Generator;
void croak_on_status(yajl_gen_status s) {
if (s == yajl_gen_status_ok) {
{
Perl_croak(aTHX_ "YAJL: Unknown status");
}
}
MODULE = JSON::YAJL::Generator PACKAGE = JSON::YAJL::Generator
JSON::YAJL::Generator new(package, unsigned int beautify = 0, const char *
RETVAL = g;
OUTPUT:
RETVAL
void integer(JSON::YAJL::Generator g, long int n)
CODE:
croak_on_status(yajl_gen_integer(g, n));
void double(JSON::YAJL::Generator g, double n)
CODE:
croak_
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* \file yajl_gen.h
* Interface to YAJL's JSON generation facilities.
*/
#include <yajl_common.h>
#ifndef __YAJL_GEN_H__
#define __YAJL_GEN_H
ed while in an error
* state */
yajl_gen_in_error_state,
/** A complete JSON document has been generated */
yajl_gen_generation_complete,
/**
* Set a function and context argument that should be used to
* output generated json. the function should conform to the
* yajl_print_t prototype while the context argument
::Deferred> options, but the
gist is:
my $json = $stack->freeze({ format => 'JSON' });
...
my $stack = Message::Stack->thaw($json, { format => 'JSON' });
=head1 ATTRIBUTES
=head2 messages
Re
use Squatting;
use Data::Dump 'pp';
package Stardust::Demo::Controllers;
use AnyEvent::HTTP;
use JSON;
use Data::Dump 'pp';
use aliased 'Squatting::H';
our $Box = H->new({
id => "",
color =>
# my $box = $boxes->map->[$y]->[$x];
# $box->color($color);
my $body = "m=".encode_json({
type => "ColorBox",
id => $id,
color => $color,
});
htt
package Blitz::API;
use strict;
use warnings;
use LWP;
use Blitz;
use JSON;
use MIME::Base64;
=head1 NAME
Blitz::API - Perl module for API access to Blitz
=cut
=head1 SUBROUTINES/METHODS
=head2
-API-Client' => 'Perl',
);
return $response;
}
=head2 _decode_response
Decodes the JSON result object from Blitz
Decodes base64 response in content areas of request and response
=cut
'server';
$return->{cause} = $response->code();
}
else {
$return = decode_json($response->{_content});
for my $key ('request', 'response') {
if ($return->{r
t::Controllers;
use strict;
use warnings;
use aliased 'Squatting::H';
use Time::HiRes 'time';
use JSON;
use AnyEvent;
use Coro;
use Coro::AnyEvent;
use Coro::Timer;
use Coro::Signal;
our $Channel = H
et => sub {
my ($self) = @_;
encode_json([ sort keys %channels ]);
}
),
# Channel
# To generate messages on a channel, POST a JSON object to this controller
# using the CGI va
my @ch = split(/\+/, $channels);
encode_json([ map { my $ch = channel($_); $ch->to_hash } @ch ]);
},
# [private] It should accept a JSON object and send it to the appropriate channels
package Blitz::API;
use strict;
use warnings;
use LWP;
use Blitz;
use JSON;
use MIME::Base64;
=head1 NAME
Blitz::API - Perl module for API access to Blitz
=cut
=head1 SUBROUTINES/METHODS
=head2
-API-Client' => 'Perl',
);
return $response;
}
=head2 _decode_response
Decodes the JSON result object from Blitz
Decodes base64 response in content areas of request and response
=cut
'server';
$return->{cause} = $response->code();
}
else {
$return = decode_json($response->{_content});
for my $key ('request', 'response') {
if ($return->{r
use strict;
use warnings;
use Blitz;
use Blitz::API;
use Blitz::Validate;
use MIME::Base64;
use JSON::XS;
use LWP;
use Storable qw(dclone);
=head1 NAME
Blitz::Exercise - Superclass for Sprint and
package RPC::Any::Server::JSONRPC::PSGI;
use strict;
use warnings;
use Moose;
extends 'RPC::Any::Server::JSONRPC::HTTP';
with 'RPC::Any::Interface::PSGI';
__PACKAGE__->meta->make_immutable;
1;
__E
ND__
=head1 NAME
RPC::Any::Server::JSONRPC::PSGI - JSON-RPC server for a PSGI environment
=head1 SYNOPSIS
# in app.psgi
use RPC::Any::Server::JSONRPC::PSGI;
# Create a server where calling
Foo.bar will call My::Module->bar.
my $server = RPC::Any::Server::JSONRPC::PSGI->new(
dispatch => { 'Foo' => 'My::Module' },
allow_get => 0,
);
my $handler = sub{ $server->handle_i
h
*
* Parses JSON data and returns the data in tree form.
*
* \author Florian Forster
* \date August 2010
*
* This interface makes quick parsing and extraction of
* smallish JSON docs trivial:
x02
/** A pointer to a node in the parse tree */
typedef struct yajl_val_s * yajl_val;
/**
* A JSON value representation capable of holding one of the seven
* types above. For "string", "number",
} array;
} u;
};
/**
* Parse a string.
*
* Parses an null-terminated string containing JSON data and returns a pointer
* to the top-level value (root of the parse tree).
*
* \param input
TH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* \file yajl_parse.h
* Interface to YAJL's JSON stream parsing facilities.
*/
#include <yajl_common.h>
#ifndef __YAJL_PARSE_H__
#define __YAJL
pedef struct yajl_handle_t * yajl_handle;
/** yajl is an event driven parser. this means as json elements are
* parsed, you are called back to do something with the data. The
* func
size_t numberLen);
/** strings are returned as pointers into the JSON text when,
* possible, as a result, they are _not_ null padded */
int (* yajl_st
be reinitialized
* to zero.
*
* Finally, the output buffer is usually just a pointer into the jsonText,
* however in cases where the entity being lexed spans multiple chunks,
* the lexer will bu
performance.
*/
yajl_tok yajl_lex_lex(yajl_lexer lexer, const unsigned char * jsonText,
size_t jsonTextLen, size_t * offset,
const unsigned char ** outBuf,
xer forward */
yajl_tok yajl_lex_peek(yajl_lexer lexer, const unsigned char * jsonText,
size_t jsonTextLen, size_t offset);
typedef enum {
yajl_lex_e_ok = 0,
yajl_lex_
Crashplan::Client;
use warnings;
use strict;
use Carp;
use MIME::Base64;
use REST::Client;
use JSON;
use Crashplan::Client::Org;
use Crashplan::Client::User;
use Crashplan::Client::Computer;
use C
lf->set_header(Authorization => "Basic $creds");
$self->set_header(Accept => "application/json");
# Automatically follow redirect
$self->{rest}->setFollow(1);
$self->{r
ntity;
my $body = encode_json( { map {$_ => $entity->{$_}} @attributes} );
$self->POST($entity->url,$body);
my $return = undef;
my $param = decode_json($self->responseContent);
Devel::Symdump
Email::Date::Format
File::Listing
File::Type
GD::Graph
GD::SecurityImage
IO::Pty
JSON
JSON::PP
List::MoreUtils
List::Util
MIME::Types
MLDBM
Module::CoreList
Module::Load
NetAddr::IP
Pac
package Crashplan::Client::User;
use strict;
use warnings;
use JSON;
our $VERSION = '0.003_0';
=head1 NAME
Crashplan::Client::User - Object representation of Crashplan PROe server's entity
=head1
rent object
my @attributes = grep {!/^rest|rest_header$/} keys %$self;
my $body = encode_json( { map {$_ => $self->{$_}} @attributes} );
$self->{rest}->PUT($self->url."/".$self->id,$body
aFastCGI;
my $loop = IO::Async::Loop->new;
my $model = EntityModel->new->load_from(JSON => { file => 'model.json' });
my $tmpl = EntityModel::Template->new;
$tmpl->process_template(\'[% PROCESS T