use File::ShareDir qw( dist_file );
use File::Spec;
use File::Slurp;
use Pod::Simple::Search;
use JSON::XS;
use Path::Class::File;
use Pod::POM;
use XML::Simple;
use LWP::Simple;
use List::MoreUtils q
=> $data->{matches}};
while(my($k,$v) = each %{$output->{module}}) {
}
$c->res->body(encode_json($data));
}
sub module : Local {
my ( $self, $c, $module ) = @_;
my $search = Pod::Simple::Sea
arser->parse($source);
$toc = $view->print($pom);
return encode_json( _toc_to_json( [], split( /\n/, $toc ) ) );
}
sub _toc_to_json {
my $tree = shift;
my @sections = @_;
my @uniq = uniq
var data = JSON.parse(e.data);
if (data.msg)
alert (data.msg);
};
function send_msg(message) {
socket.send(JSON.stringify({ msg: mess
('colours' => \@colours) : ())
);
}
=head2 TO_JSON()
Returns HashRef that is possible to give to C<encode_json()> function.
=cut
sub TO_JSON {
my ($self) = @_;
my @values_with_la
lf->response->content_type =~ m/json/ ) {
$value =~ s/^var tumblr_api_read = //;
$value =~ s/;$//;
$value = WebService::Tumblr::json->decode( $value );
}
package App::JSONPretty;
use strictures 1;
use JSON ();
use Try::Tiny;
our $VERSION = 1;
my $usage = "Usage:
$0 <filename
$0 filename
";
sub new_json_object {
JSON->new->utf8->pretty->relaxe
my ($json, $src_data) = @_;
try {
$json->decode($src_data)
} catch {
die "Error parsing JSON: $_\n";
}
}
sub encode_using {
my ($json, $data_structure) = @_;
try {
$json->enco
ting JSON: $_\n";
}
}
sub run {
my $json = new_json_object;
print STDOUT encode_using $json, decode_using $json, source_data;
return 0;
}
exit run unless caller;
1;
=head1 NAME
jsonpret
rGamoo::AC::FileList;
use AC::MrGamoo::Debug 'files';
use AC::ISOTime;
use AC::Yenta::Direct;
use JSON;
use strict;
my $YDBFILE = "/home/acdata/logfile.ydb";
# return an array of:
# {
# filena
} map {
#debug("file: $_");
my $d = $yenta->get($_);
$d = $d ? decode_json($d) : {};
$d->{location} = [ map { $CONVERT{$_} || $_ } (split /\s+/, $d->{location}) ];
Door;
use warnings;
use strict;
use Carp;
use Data::Dumper;
use Digest::SHA qw(sha256_hex);
use JSON;
use REST::Client;
use UUID::Tiny;
#use Smart::Comments -ENV;
use base qw(Class::Accessor);
us
oded_response_body =
$response_body && $response_body ne q{}
? decode_json( $response_body )
: undef; # TODO test for response_body eq q{}
#
> 'json'}, $currency_data );
my $currency_id = $currency->[0]->{'id'};
$currency_data->{'pub_title'} = 'Coins';
$client->PUT( sprintf( 'currency/%s', $currency_id ), {format => 'json'},
$self->get_id, $resource->get_resource_name,
$resource->get_id ),
{format => 'json'}
);
return $result;
}
1;
__END__
=head1 NAME
WWW::BigDoor::URL - URL Resource Object
,v 1.1 2010/11/01 18:41:55 jaw Exp $
package AC::MrGamoo::Iter::File;
use AC::MrGamoo::Iter;
use JSON;
our @ISA = 'AC::MrGamoo::Iter';
use strict;
sub new {
my $class = shift;
my $fd = sh
= $me->{buf};
delete $me->{buf};
return $r;
}
my $fd = $me->{fd};
my $l = scalar <$fd>;
return unless $l;
$me->{progress}->();
return decode_json($l);
}
1;
T( sprintf( '%s/%s', $ep, $self->get_id ), {format => 'json'}, $payload );
}
else {
$result = $client->POST( $ep, {format => 'json'}, $payload );
}
### result: $result->[0]
* HASH_ELEMENT
* HREF_PARAM
* HTMLESCAPE
* ICONV
* IN_SET
* JSESCAPE
* JSON
* LIST_ELEMENT
* LOG
* MD5
* MAX
* MB_SIZE
* MB_SUBSTR
* MB_TRUNCATE
parameters to undef.
$T -> clear_params();
or
$T -> reset();
=head2 json_param() - set some parameters
$T -> json_param('{ "foo": "bar", "baz" : 123}');
=head2 output() - returns output as
nt->POST( sprintf( '%s/%s/execute/%s', $ep, $self->get_id, $end_user_login ),
{format => 'json'}, $payload );
return $result;
}
1;
__END__
=head1 NAME
WWW::BigDoor::NamedTransactionGrou
# $Id: SolveMedia.pm,v 1.1 2010/09/13 18:01:06 ilia Exp $
package WWW::SolveMedia;
use Carp;
use JSON;
use LWP::UserAgent;
use Digest::SHA1 'sha1_hex';
use strict;
our $VERSION = '1.1';
my $AC_AP
";
if( $opts ){
$html .= " <script>\n var ACPuzzleOptions = "
. encode_json($opts)
. ";\n </script>\n";
}
my $baseurl = $sslp ? $me->{https} : $me->{http
oo::MySelf;
use AC::MrGamoo::EUConsole;
use AC::MrGamoo::Stats;
use AC::DC::IO;
use AC::Misc;
use JSON;
use Time::HiRes 'time';
use strict;
# RSN - config? tune?
our $TASKTIMEOUT = 10;
our $XFERTIMEO
w job: $me->{request}{jobid} ($me->{request}{traceinfo})");
my $cf = $me->{options} = decode_json( $me->{request}{options} ) if $me->{request}{options};
# open connection to eu-console
C::MrGamoo::MySelf;
use AC::MrGamoo::Config;
use AC::DC::Sched;
use AC::Misc;
use AC::Import;
use JSON;
use strict;
our @EXPORT = qw(pick_best_addr_for_peer peer_list_all get_peer_by_id);
my $KEEPDO
rn $txt;
}
sub report_json {
my $all = peer_list_all();
my @fields = qw(hostname environment subsystem datacenter server_id status sort_metric);
return encode_json( [ map {
my %
use Digest::SHA1 'sha1';
use Digest::MD5 'md5';
use File::Path;
use Sys::Syslog;
use Socket;
use JSON;
use strict;
my $STATUSTIME = 5; # seconds
my $MAXRUN = 3600; # override with %attr maxr
md5( $key ));
my $p = $hash % $n;
my $io = $me->{outfd}[$p];
$io->output( encode_json( [ $key, $data ] ), "\n" );
}
# end-user's 'print' come here
sub eu_print_stdout {
my $me =
chomp;
_maybe_update_status( $me, 'RUNNING', $linen++ );
my $x = decode_json($_);
$f_final->( $x->[0], $x->[1] );
}
$h_final->{cleanup}() if $h_f
__PACKAGE__->apply_request_class_roles(qw/
Catalyst::TraitFor::Request::DecodedParams::JSON
/);
1;
=head1 METHODS
=over
=item decoded_query_parameters
decoded_query_params, dqu
P2ErrorCodes.h>
#include <CTPP2Exception.hpp>
#include <CTPP2FileSourceLoader.hpp>
#include <CTPP2JSONParser.hpp>
#include <CTPP2Logger.hpp>
#include <CTPP2Parser.hpp>
#include <CTPP2ParserException.h
// Reset parameters
int reset();
// Reset parameters
int clear_params();
// Emit JSON parameters
int json_param(SV * pParams);
// Get output
SV * output(Bytecode * pBytecode,
// Emit JSON parameters
int CTPP2::json_param(SV * pParams)
{
using namespace CTPP;
long eSVType = SvTYPE(pParams);
STRLEN iJSONLen = 0;
#ifdef SvPV_const
const char * szJSON = NULL;
$self->get_id, $resource->get_resource_name,
$resource->get_id ),
{format => 'json'}
);
return $result;
}
1;
__END__
=head1 NAME
WWW::BigDoor::Attribute - Attribute Reso
o::Task::Running;
use AC::MrGamoo::PeerList;
use AC::MrGamoo::Config;
use AC::DC::IO::Forked;
use JSON;
use strict;
my $TSTART = $^T;
my $TIMEOUT = 3600;
my $MAXREQ = 2;
my $MAXRUNNING = 7; # tune
n $REGISTRY{$task};
}
$me->{options} = decode_json( $me->{request}{options} ) if $me->{request}{options};
$me->{initres} = from_json( $me->{request}{initres}, {allow_nonref => 1} ) if $me