address => 'Maybe[Location]',
};
use JSON;
# note the lack of Location,
# which is fine because it
# was Maybe[Location]
my $data = decode_json(q[
{
"id": "1234-A",
use AnyEvent::HTTP::ScopedClient;
use AnyEvent::Campfire::Stream;
use URI;
use MIME::Base64;
use JSON::XS;
use Try::Tiny;
extends 'AnyEvent::Campfire';
has 'account' => (
is => 'ro',
isa =
my ( $self, $room, $text ) = @_;
$self->post(
"/room/$room/speak",
encode_json( { message => { body => $text } } ),
sub {
my ( $body, $hdr ) = @_;
);
}
sub put_room {
my ( $self, $room, $room_info, $callback ) = @_;
$room_info = encode_json($room_info) if ref($room_info) eq 'HASH';
$self->put( "/room/$room", $room_info, $callback );
n::Parameters>
=head3 L<Hash::Merge>
=head3 L<Hash::Merge::Simple>
=head3 L<JSON>
=head3 L<JSON::Syck>
=head3 L<JSON::XS>
=head3 L<List::AllUtils>
=head3 L<List::MoreUtils>
=head3 L<Log::Log4p
pports 2.0
[NoTabsTests]
[Test::EOL]
trailing_whitespace = 0
[Test::CPAN::Meta::JSON]
[Test::CheckDeps]
[Test::Portability]
;[Test::Pod::LinkCheck] ; Both of these are b
imum_perl = 5.10.1
[CheckPrereqsIndexed]
; META maintenance
[MetaConfig]
[MetaJSON]
[MetaYAML]
[MetaNoIndex]
directory = t
directory = xt
directory = examples
these personalized modules on CPAN. I even bantered
around the idea of using L<MetaCPAN's author JSON input|https://github.com/SineSwiper/Dist-Zilla-PluginBundle-BeLike-You/blob/master/BeLike-You.pod
% use 5.010;
% use Tapper::Reports::DPath 'reportdata';
% use Data::Dumper;
% use Data::DPath 'dpath';
% use DateTime;
% use JSON;
% use YAML::XS;
% use Data::Structure::Util 'unbless';
er within a chain.
message_chain {
encoder fooenc => ( output_to => 'out', class => 'JSON' );
....
};
Class names will be assumed to prefixed with 'Message::Passing::Filter::
in a chain.
message_chain {
decoder zmq_decode => ( output_to => 'filter', class => 'JSON' );
....
};
Class names will be assumed to prefixed with 'Message::Passing::Filter::
FIXME
GraphViz
GUID
GUIDs
HTTP
HTTPS
IETF
IP
IPv4
IPv6
IRC
ISP
ISP's
JSON
MakeMaker
Markdown
Middleware
MongoDB
mkdn
modulino
MVC
OO
OOP
PARC
PHP
P
ed by the spell check.
The stopword list includes some CPAN author names, technical terms (e.g. JSON,
URI) and other commonly-used words not included in the default word list (e.g.
mixin, munging).
package WebService::Dropbox::TokenFromOAuth1;
use strict;
use warnings;
use JSON;
use Net::OAuth;
use LWP::UserAgent;
sub token_from_oauth1 {
my ($class, $args) = @_;
my $request = Net::OAuth
my $res = $ua->post($request->to_url);
if ($res->is_success) {
my $data = decode_json($res->decoded_content);
return $data->{access_token};
}
warn $res->decoded_conten
package Plack::Middleware::JSONP::Headers;
{
$Plack::Middleware::JSONP::Headers::VERSION = '0.11';
}
#ABSTRACT: Wraps JSON response with HTTP headers in JSONP
use strict;
use parent qw(Plack::Middl
eware);
use Plack::Util;
use Plack::Builder;
use URI::Escape ();
use JSON ();
use Scalar::Util 'reftype';
use HTTP::Headers ();
use Plack::Util::Accessor qw(callback_key headers template);
sub prepa
nless ($self->template) {
$self->template('{ "meta": %s, "data": %s }')
}
}
sub wrap_json {
my ($self, $status, $headers, $data) = @_;
my $meta = { status => $status };
my @
t
use strict;
use warnings;
use base qw(Thrift::Parser::Type);
use Scalar::Util qw(blessed);
use JSON::XS;
=head1 USAGE
Stringification is overloaded to the values 'true' or 'false'.
When composin
ss, $value) = @_;
if (ref $value && blessed($value) && $value->isa('JSON::XS::Boolean')) {
$value = $value == JSON::XS::true ? 1 : 0;
}
return $class->SUPER::compose($value);
}
rs or array references,
except for boolean values which should be set as L<JSON::Boolean>
values like C<JSON::true> and C<JSON::false>.
=head2 pantry_host
This optional attribute holds an alternate
package Thrift::JSONProtocol;
=head1 NAME
Thrift::JSONProtocol
=head1 DESCRIPTION
JSON protocol implementation for thrift.
This is a full-featured protocol supporting write and read.
This code w
H => '\\',
ZERO => '0',
ESCSEQ => join('','\\','u','0','0'),
VERSION => 1,
JSON_CHAR_TABLE => [
# 0 1 2 3 4 5 6 7 8 9 A B C D E F
0,
lf->{context_} = Thrift::JSONProtocol::JSONBaseContext->new( protocol => $self );
# Reader that manages a 1-byte buffer
$self->{reader_} = Thrift::JSONProtocol::LookaheadReader->ne
',
);
has extra_data => (
is => 'ro',
predicate => 'has_extra_data',
);
sub TO_JSON {
my $self = shift;
return {
($self->has_errors ? (errors => $self->erro
address => 'Maybe[Location]',
};
use JSON;
# note the lack of Location,
# which is fine because it
# was Maybe[Location]
my $data = decode_json(q[
{
"id": "1234-A",
the data to the
doctype.
=head2 TO_JSON
Returns a hashref with keys of C<errors> and C<extra_data>, containing the
values of those attributes. This allows L<JSON> to properly encode the error
objec
Dancer ':syntax';
use Dancer::Plugin;
use Carp;
use Try::Tiny;
use Capture::Tiny qw(capture);
use JSON::XS qw();
use Scalar::Util qw(blessed);
# POE sessions will be created by Tapir::MethodCall; let
alidator;
use Tapir::MethodCall;
use Tapir::Documentation::NaturalDocs;
use File::Spec;
my $json_xs = JSON::XS->new->allow_nonref->allow_blessed;
our $VERSION = 0.04;
register setup_tapir_documenta
t->params;
# Decode the JSON payload
if ($request->content_length && $request->content_type && $request->content_type eq 'application/json' && length $request->body) {
,
isa => AbsDir,
coerce => 1,
default => sub { dir(".")->absolute }
);
# where environment JSON files and node subdirectories are stored
sub _environment_dir {
my ($self) = @_;
my $path = $
$path;
}
# file path where environment JSON file is located
sub _environment_path {
my ($self, $env) = @_;
return $self->_environment_dir->file("${env}.json");
}
sub _node_path {
my ($self, $n
rn $self->_node_dir($env)->file("${node_name}.json");
}
sub _role_path {
my ($self, $role_name) = @_;
return $self->_role_dir->file("${role_name}.json");
}
sub _cookbook_path {
my ($self, $coo
new;
}
$data->{json_class} = "Chef::Environment";
$data->{chef_type} = "environment";
return $data;
}
sub _thaw {
my ($self, $data) = @_;
delete $data->{$_} for qw/json_class chef_type/;
ks-checker-plus/src/main.js
/product/chrome-extentions/google-tasks-checker-plus/src/manifest.json
/product/chrome-extentions/google-tasks-checker-plus/src/options.html
/product/chrome-ext
ct/icon-128.png
skip icon.gif
skip jquery-1.4.2.min.js
skip main.js
skip manifest.json
skip options.html
skip popup.html
skip reset.css
** delete **
skip background
ground.html.tmp
skip icon.gif
skip jquery-1.4.2.min.js
skip main.js
skip manifest.json
skip options.html
skip popup.html
skip reset.css
=head2 cp
copy file or directory.
asename qw/dirname basename/;
use File::Slurp qw/read_file/;
use IPC::Cmd qw/can_run/;
use JSON qw/decode_json/;
use namespace::clean;
sub abstract {
return 'Edit items in a pantry (nodes, roles,
failed!: $!";
eval { decode_json(read_file($path,{ binmode => ":raw" })) };
if ( my $err = $@ ) {
$err =~ s/, at .* line .*//;
warn "Warning: JSON errors in config for $name\n";
ESCRIPTION
This class implements the C<pantry edit> command, which is used to open the node data
JSON file in an editor for direct editing.
=for Pod::Coverage options validate
=head1 AUTHOR
David
ry apply subcommand
our $VERSION = '0.012'; # VERSION
use Pantry::App -command;
use autodie;
use JSON;
use namespace::clean;
sub abstract {
return 'Apply recipes or attributes to a node or role'
my ($self, $value) = @_;
if ($value eq 'false') {
$value = JSON::false;
}
elsif ( $value eq 'true' ) {
$value = JSON::true;
}
return $value;
}
1;
# vim: ts=2 sts=2 sw=2 et:
__
try sync subcommand
our $VERSION = '0.012'; # VERSION
use Pantry::App -command;
use autodie;
use JSON 2;
use Storable qw/dclone/;
use Net::OpenSSH;
use Path::Class;
use Pantry::Model::Util qw/merge_h
# prepare node JSON for upload
# XXX should really check to be sure it exists
my ($node_fh, $node_json) = tempfile( "node.json-XXXXXX", TMPDIR => 1 );
$obj->save_as($node_json);
# XXX Chef
);
if ( -e $env->path ) { # if we have a data file, then merge it
my $base = decode_json( file($node_json)->slurp );
my $env_default = dclone $env->default_attributes;
my $env_override =