traits => [qw/NoGetopt/]
);
has "+$_" => ( traits => [qw/NoGetopt/] )
for qw/api_key base_url ua json items list_since/;
has "+$_" => (documentation => "Set $_. Can also be set in ~/.pocketrc")
for
=head2 C<remote_branch>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::Role::Git::Remote::Check",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpa
ce );
use Plack::Response;
use Plack::Session;
use LWP::Protocol::https;
use LWP::UserAgent;
use JSON;
sub prepare_app {
my $self = shift;
$self->audience or croak 'audience is not set';
}
>method eq 'POST' ) {
my $uri = 'https://verifier.login.persona.org/verify';
my $json = {
assertion => $req->body_parameters->{'assertion'},
audience => $self
T', $uri );
$persona_req->header( 'Content-Type' => 'application/json' );
$persona_req->content( to_json( $json, { utf8 => 1 } ) );
my $ua = LWP::UserAgent->new( ssl_opts => {
=head2 C<remote_name>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::Role::Git::Remote::Update",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpa
) unless $new_title;
my $res = $self->pocket->_send({
update_title => $self->pocket->json->encode({
$self->item_id => {
url => $self->url,
titl
g() unless $new_tags;
my $res = $self->pocket->_send({
update_tags => $self->pocket->json->encode({
$self->item_id => {
url => $self->url,
tags
) unless defined $new_state;
my $res = $self->pocket->_send({
read => $self->pocket->json->encode({
$self->item_id => {
url => $self->url,
}
ad1 VERSION
version 0.04
=head1 SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec('api.json');
# foo=bar and blah=baz will be passed on each request.
$client->enable('DefaultParam
>
=back
=head2 HTTP
Web stuff.
=over
=item *
L<HTTP::Tiny>
=back
=head2 JSON
JSON stuff.
=over
=item *
L<JSON::Tiny>
=back
=head2 YAML
YAML stuff.
=over
=item *
L<YAML::Tiny>
=back
package Geo::Coder::OSM;
use strict;
use warnings;
use Carp qw(croak);
use Encode ();
use JSON;
use LWP::UserAgent;
use URI;
our $VERSION = '0.03';
$VERSION = eval $VERSION;
our %SOURCES = (
o
ch');
$uri->query_form(
q => $location,
format => 'json',
addressdetails => 1,
'accept-language' => 'en',
%params,
);
lat => $lat,
lon => $lon,
format => 'json',
addressdetails => 1,
'accept-language' => 'en',
%params,
);
package WWW::Tabela::FipeWrite;
use JSON::XS;
use File::Slurp;
use Moo;
sub write {
my ( $self, $veiculos ) = @_;
write_file( 'fipe.json', encode_json $veiculos );
}
1;
ct;
use warnings;
our $VERSION = "0.02";
use parent qw(Exporter);
use JSON::XS;
our @EXPORT = qw(call_js);
my $JSON = JSON::XS->new()->ascii(1)->allow_nonref();
my %_ESCAPE = (
'+' => '\\u00
my $json = $JSON->encode($data);
$json =~ s!([&+<>])!$_ESCAPE{$1}!g;
join('',
q{<script class="call_js" type="text/javascript">},
$func,
'(',
$json,
# ABSTRACT: Add TO_JSON to your packages without the boilerplate
package Package::JSONable;
{
$Package::JSONable::VERSION = '0.001';
}
use strict;
use warnings;
use Scalar::Util qw(reftype);
use Ca
qw(croak);
use List::MoreUtils qw(none);
use JSON ();
sub import {
my ( $class, %import_opts ) = @_;
my ( $target ) = caller;
my $to_json = sub {
my ( $self, %opts ) = @_;
if ( $value ) {
$hash{$method} = JSON::true;
}
else {
$hash{$method} = JSON::false;
}
}
}
= cwd();
chdir '/tmp/cpan-fixes';
cpanm(@params);
chdir $cwd;
}
sub parse_meta_json {
$_[0] ||= 'META.json';
require CPAN::Meta;
return CPAN::Meta->load_file( $_[0] );
}
sub capture_stdo
ixes;
$caller_stash->{cpanm_fix} = *cpanm_fix;
$caller_stash->{parse_meta_json} = *parse_meta_json;
$caller_stash->{capture_stdout} = *capture_stdout;
$caller_stash->{deploy_st
_perl_code {
my $PERL_NAME = '[A-Za-z_][A-Za-z0-9_]*';
# Class name
# Foo::Bar
# JSON::PP::
return 1 if $_[0] =~ /\A
[\+\$]?
(?: $PERL_NAME :: )+
$PERL_NAM
ef access
return 1 if $_[0] =~ /\A
\$ $PERL_NAME -> \{ $PERL_NAME \}
\z/x;
# JSON::XS-ish boolean value
return 1 if $_[0] eq '\1' || $_[0] eq '\1';
return 0;
}
1;
__END_
package Mail::RoundTrip;
use 5.006;
use strict;
use warnings;
use Moo;
use JSON;
use UUID::Tiny qw(:std);
use Email::Sender::Simple qw(sendmail);
use Email::Simple;
use Email::Simple::Creator;
use Fi
ling slashes
my $filename = $self->code;
my $json = encode_json($self->data);
write_file("$spooldir/$filename", {no_clobber => 1}, $json);
}
=head2 get_data(code => $code, spool_dir
slashes
my $filename = $args{code};
my $json = read_file("$spooldir/$filename");
unlink("$spooldir/$filename");
return decode_json($json);
}
=head1 AUTHOR
Chris Travers, C<< <chr
qw($VERSION);
$VERSION = '0.28';
use base qw(Net::NicoVideo::Content Class::Accessor::Fast);
use JSON 2.01;
use vars qw(@Members);
@Members = qw(
id
mylistgroup
mylistitem
error
status
);
__PACKAGE
->load($_[0]) if( defined $_[0] );
my $json = decode_json( $self->_decoded_content );
# member "status" exists in all case
$self->status( $json->{status} );
# member "error" exists
Content::NicoAPI::Error->new($json->{error}) )
if( $json->{error} );
# member "id" in a case /mylist/add
$self->id( $json->{id} )
if( exists $json->{id} );
# member "myli
clone/update all your repositories from github.com
use LWP::UserAgent;
use Config::GitLike;
use JSON 2 ();
sub repo_uris {
my $config_file = "$ENV{HOME}/.gitconfig";
my $config = Config::GitLi
ig_file'\n";
my $json = _get_json("http://github.com/api/v1/json/$login?login=$login&token=$token");
my $data = eval { JSON->new->decode($json) };
die "BAD JSON\n$@\n$json\n" unless $data;
t@github.com:%s/%s.git',
$login,
$repo->{name};
}
return \%repo_uri;
}
sub _get_json {
my $url = shift;
my $ua = LWP::UserAgent->new;
$ua->env_proxy;
my $response = $ua->ge
package Told::Client;
use 5.016002;
use strict;
use warnings;
use JSON;
use LWP;
require Exporter;
our @ISA = qw(Exporter);
our %EXPORT_TAGS = ( 'all' => [ qw(
tell
setDebug
setConnectio
'} =~ /^test/){
$result = encode_json(\%data);
} else {
$result = $browser->post($self->{'host'}."/log"
, encode_json \%data
);
}
} elsif($self
if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) {
my $prereqs = parse_meta_json()->effective_prereqs;
my $reqs = $prereqs->requirements_for( 'develop', 'requires' );
my
e JSON::XS qw(decode_json);
use Time::HiRes;
use Try::Tiny;
our $VERSION = '0.07';
my @file_types = ({
type => 'json',
re => qr{\.json$},
parser => sub {
my ($filename) = @_;
my $json;
$filename) =~ /(.*)/s; # untaint
try {
$json = decode_json(encode('UTF-8', $1));
} catch {
warning "couldn't parse json file ($filename): $_\n";
};
} catch {
warning "couldn't find file to parse ($filename): $_\n";
};
return $json;
},
});
my $dynamic_config;
register dynamic_config => sub {
my ($file_key) = @_;
initialize() unless $dynam
ts::File;
use warnings;
use strict;
use base 'Dezi::Stats';
use Carp;
use Log::Dispatchouli;
use JSON;
our $VERSION = '0.001006';
=head1 NAME
Dezi::Stats::File - store Dezi statistics via Log::Dis
ef> encoded as JSON to the dispatcher()->log method.
=cut
sub insert {
my $self = shift;
my $row = shift or croak "hashref required";
$self->{dispatcher}->log( encode_json($row) );
r