accessor => 'json_options',
}, {
setter => 'json_options_serialize',
fallback => 'json_options',
}, {
package => 'RPC::ExtDirect::Deserialize',
var => 'JSON_OPTIONS',
t
ype => 'hash',
setter => 'json_options_deserialize',
fallback => 'json_options',
}, {
accessor => 'router_class',
default => 'RPC::ExtDirect::Router',
}, {
accessor => 'time
Walk::Clone v0.024;
use Log::Shiras::Types qw(
ElevenArray ElevenInt ReportObject YamlFile
JsonFile FileHash ArgsHash
);#
#########1 Package Variables 3#########4#########5#########6######
( @args > 1 ) and ( scalar( @args ) % 2 == 0 ) ) ? { @args } :
( is_YamlFile( $args[0] ) or is_JsonFile( $args[0] ) ) ? to_FileHash( $args[0] ) :
to_ArgsHash( $args[0] );
###InternalSwitchboar
s the new settings take
precedence. So be careful!
B<Accepts:> [%args|$args_ref|full/file/path.(json|yml)] %args are treated the same
as attributes passed to other class style calls to new. The dat
ode|
^Eval| ^Exporter| ^feature| ^File|
^Filter| ^if\.pm| ^integer| ^IO.File|
^JSON| ^List| ^Log.Shiras.Unhide| ^metaclass|
^Module| ^Moose(?!X)| ^MooseX.Has| ^MooseX.No
ode|
^Eval| ^Exporter| ^feature| ^File|
^Filter| ^if\.pm| ^integer| ^IO.File|
^JSON| ^List| ^Log.Shiras.Unhide| ^metaclass|
^Module| ^Moose(?!X)| ^MooseX.Has| ^MooseX.No
package WWW::TVMaze;
use 5.006;
use strict;
use warnings;
use Mouse;
use LWP::UserAgent;
use JSON::XS;
use DateTime;
use Params::Validate qw(:all);
=head1 NAME
WWW::TVMaze - Interface to TVMaze API
return {};
}
my $data = {};
eval {
$data = decode_json($response->decoded_content);
};
if ($@) {
$self->error('problem decoding json');
return undef;
}
return $data;
}
=head1 AUT
mmand line script which can return this data
in a different formats - C<xml|data-dumper|ecsv|yaml|json|rrd>.
=cut
use warnings;
use strict;
our $VERSION = '0.02';
use Moose;
use Moose::Util::TypeC
WebService::HackerNews;
$WebService::HackerNews::VERSION = '0.05';
use 5.006;
use Moo;
use JSON qw(decode_json);
use WebService::HackerNews::Item;
use WebService::HackerNews::User;
has ua => (
i
a hack. Can I use JSON->allow_nonref to handle
# the fact that maxitem returns an int rather than [ int ]?
return $response->{content} =~ m!^\s*[{[]!
? decode_json($response->{conte
result = $self->$get('topstories.json');
return @$result;
}
sub item
{
my $self = shift;
my $id = shift;
my $result = $self->$get("item/$id.json");
return WebService::Hack
MooseX::Types::Moose qw( Str );
use MooseX::Types::URI qw(Uri);
use URI;
use URI::QueryParam;
use JSON::MaybeXS;
use Time::HiRes;
use LWP::UserAgent;
use Data::Dumper;
our $VERSION = '0.004';
$VERSIO
essage;
warn "Something get wrong on response";
warn Dumper($response);
}
JSON::MaybeXS::decode_json($response->decoded_content);
} else {
warn "Content: ", $response->decoded_conten
do { bless \(my $dummy = 1), __PACKAGE__ };
my $false = do { bless \(my $dummy = 0), __PACKAGE__ };
sub true() { $true }
sub false() { $false }
sub TO_JSON($) {
return $_[0] ? \1 : \0;
}
1;
n::CGISession>,
L<Cookie|Dancer2::Session::Cookie>,
L<DBIC|Dancer2::Session::DBIC>,
L<JSON|Dancer2::Session::JSON>,
L<Memcached|Dancer2::Session::Memcached>,
L<MongoDB|Dancer2::Session::MongoDB>,
L<P
ift L<http://developers.facebook.com/thrift/>
ASN.1 L<http://en.wikipedia.org/wiki/ASN.1>,
L<JSON> and L<YAML>
=head1 AUTHOR, ACKNOWLEDGEMENS, COPYRIGHT
Author: Igor Gariev <gariev@hotmail.
le
FileHash JsonFile ArgsHash ReportObject
NameSpace CSVFile XLSXFile XLSFile
XMLFile IOFileType HeaderArray
)];#
#~ use YAML::Any qw( Dump LoadFile );
use JSON::XS;
########
= qr/[.](txt|csv)/;
my $yamlextention = qr/\.(?i)(yml|yaml)/;
my $jsonextention = qr/\.(?i)(jsn|json)/;
my $coder = JSON::XS->new->ascii->pretty->allow_nonref;#
my $switchboard_attributes =
lFile, as Str,
where{ $_ =~ $yamlextention and -f $_ },
message{ $_ };
subtype JsonFile, as Str,
where{ $_ =~ $jsonextention and -f $_ },
message{ $_ };
subtype FileHash, as HashRef;
###Internal
ead1 VERSION
0.008
=cut
our $VERSION = '0.008';
use Dancer2::Core::Types;
use File::Spec;
use JSON::MaybeXS;
use Module::Find qw/findallmod/;
use Module::Runtime qw/use_module/;
use Plack::App::De
L<Plack::Debugger::Storage/filename_fmt>.
Defaults to C<%s.json>.
=cut
has filename_fmt => (
is => 'ro',
default => '%s.json',
);
=head2 injector_ignore_status
If set to a true value
>.
Defaults to C<< JSON::MaybeXS->new( convert_blessed => 1, utf8 => 1 ) >>
=cut
has serializer => (
is => 'ro',
isa => Object,
default => sub {
JSON::MaybeXS->new(
xt, it will have the value 0 or 1.
In string context is will have the value "false" or "true".
In JSON, it will correctly return false or true values.
my $bool : Boolean;
print $bool; # "f
xt.
=head2 TO_JSON
Provided that convert_blessed is set on the JSON (or JSON::XS) object,
the variable will correctly convert to JSON true or false.
my $json = new JSON;
$json->pretty->conv
ssed;
my $bool : Boolean;
my %hash = (
value => $bool,
me => true,
);
print $json->encode(\%hash); # {
# "value" : false,
# "me" : true
# }
r reference.
=back
Whatever the child writes is returned. drop_privs() does not use Storable or
JSON or XML or anything. It is up to you to specify how the data is to be
represented and used. Howeve
ate:
template_flute:
iterators:
fruits:
class: JSON
file: fruits.json
=head2 FILTER OPTIONS
Filter options and classes can be specified in the configu
Mango BSON documents as Extended JSON
use 5.010;
use Mojo::Base -strict;
use Mango::BSON ();
use Mojo::Util ();
use re (); # regexp_pattern()
use JSON::XS ();
use Exporter 5.57 'im
port';
our @EXPORT_OK = qw(to_extjson);
sub to_extjson {
my $doc = shift;
state $encoder = JSON::XS->new->convert_blessed(1);
my %opts = (pretty=>0,@_);
$encoder->$_($opts{$_}) for qw
ngo::BSON::BINARY_UUID(),
'user_defined' => Mango::BSON::BINARY_USER_DEFINED(),
);
my %TO_EXTJSON = (
# bson_bin
'Mango::BSON::Binary' => sub {
my $bindata = Mojo::Util::b64_enco
: qw/dot dot dot/
;
}
sub TO_JSON {
my $self = shift;
return +{
origin_table => $self->origin_table,
::Scoreboard;
use Net::CIDR::Lite;
use Try::Tiny;
use JSON;
use Fcntl qw(:DEFAULT :flock);
use IO::Handle;
our $VERSION = '0.36';
my $JSON = JSON->new->utf8(0);
sub prepare_app {
my $self = shi
SERVER_PROTOCOL},
time => time(),
};
}
$self->{__scoreboard}->update($JSON->encode({
%{$prev},
pid => $$,
ppid => getppid(),
uptime => $self
for my $pid ( @all_workers ) {
my $json = $stats->{$pid};
my $pstatus = eval {
$JSON->decode($json || '{}');
};
$pstatus ||= {};
::Indexed
base class.
=head2 In-place item modification not supported
See L<Tie::File::Indexed::JSON/"In-place item modification not supported"> for details.
=head2 Limited datatype support
See L<
lumn_name_tag;
}
sub TO_JSON {
my $self = shift;
return +{
name => $self->name,
data_type => $self->data_type,
relations => [map { $_->TO_JSON } @{ $self->relations }