a
=head1 DESCRIPTION
This distribution has a valid, empty C<provides> metadata hash in its
META.json and META.yml to test how PAUSE, CPAN clients and search
sites handle that.
=head1 AUTHOR
Tatsuh
named in the ruleset an actual color. It is defined using YAML (which is a superset of JSON, so you may use JSON if you prefer). The file should be built as a single section that contains a hash at t
dleware::Negotiate->new(
formats => {
json => {
type => 'application/json',
app => $json_app,
},
html => {
Parser::JSON;
use Params::Validate qw( :all );
use Readonly;
use URI;
use version; our $VERSION = qv('1.0.0');
# Module implementation here
# constants
Readonly my $REGEX_FORMAT => '^(?:json|xml)$'
messages => '/1/messages.json',
users => '/1/users/validate.json',
receipts => '/1/receipts/$receipt$.json',
sounds => '/1/sounds.json',
};
},
);
= @_;
return WebService::Simple->new(
response_parser => WebService::Simple::Parser::JSON->new,
base_url => $self->base_url,
debug => $self->debug,
);
package Lithium::WebDriver;
use strict;
use warnings;
use JSON::XS;
use Time::HiRes qw/sleep gettimeofday alarm/;
use LWP::UserAgent;
use MIME::Base64;
use Lithium::WebDriver::Utils;
use HTTP::Reque
__PACKAGE__,
use_eval => 0,
);
$self->{LWP}->default_header(
Content_Type => "application/json;charset=UTF-8");
# pretty sure this violates RFC 2616
push @{$self->{LWP}->requests_redirectabl
};
}
sub _parse_error
{
my ($self, $error) = @_;
my $msg = $error;
eval {
$error = decode_json $error;
$self->{error} = $error;
delete $error->{value}{screen};
$msg = $error->{value}{mes
ccount details to
it.
=cut
use Future;
use Future::Utils qw(try_repeat);
use HTTP::Request;
use JSON::MaybeXS;
use Digest::SHA qw(hmac_sha512_hex sha256_hex);
use List::Util qw(pairmap);
use List::U
get(
$self->base_url . '/api/3/depth/' . $pair
)->then(sub {
eval {
my $data = $self->json->decode(shift);
my ($lowest_ask) = nsort_by { $_->[0] } @{$data->{btc_usd}{asks}};
my ($h
,
ssl => $self->ssl,
)->then(sub {
eval {
my $body = shift;
my $data = $self->json->decode($body);
return Future->done($data->{return}) if $data->{success};
return Future->
Wx::Event qw(EVT_BUTTON EVT_TEXT EVT_CHAR EVT_RIGHT_UP EVT_MENU EVT_COMBOBOX EVT_TEXT_ENTER);
use JSON::XS ();
use Path::Tiny;
sub new {
my $class = shift;
my $parent = shift;
my $self = $class->
howModal == wxID_CANCEL;
my $path = $file_dialog->GetPath;
$file_dialog->Destroy;
my $json = eval { JSON::XS->new->utf8->pretty->encode( { $editor_name => $editor->{editors}->{ $editor_name } } )
ler::Wx::FormEditor::SaveFieldLayout: error encoding fields: $@") if $@;
path($path)->spew_raw($json) or Wrangler::debug("Wrangler::Wx::FormEditor::SaveFieldLayout: error writing layout file: $path:
0 2013-07-01 (unreleased)
- start of new major version, branch/rewrite
- switch from YAML to JSON for settings
- new XDG config file location
- removed sidecar-file handling for now
- many
package Wrangler::Config;
use strict;
use warnings;
use Cwd;
use JSON::XS ();
use File::HomeDir;
use Data::Dumper ();
use Digest::MD5 ();
use Path::Tiny;
# Wx::PlatformInfo; # check for unicode bui
'.wrangler.json' ){
Wrangler::debug('Wrangler::Config::read: Planning to read settings file from working-dir: .wrangler.yaml');
$path = Cwd::cwd . $env{PathSeparator} . '.wrangler.json';
$env{'
';
}
unless($path){
$path = $env{UserConfigDir};
$path .= $env{PathSeparator} . '.wrangler.json' if $path;
if($path){
$env{'config.file.location'} = 'home-dir';
Wrangler::debug('Wrangle
elf = shift;
my $request = $self->req->json;
my @emails;
my $delay = Mojo::IOLoop::Delay->new;
$delay->on(finish => sub {
$self->render(json => \@emails);
});
my $cb = $delay->beg
os_version'=> '800000',
'Accept'=> '*/*',
'platform'=> 'ios',
'Content-Type'=> 'application/json; charset=utf-8',
'Connection'=> 'keep-alive',
'Proxy-Connection'=> 'keep-alive',
'Content-L
>'en' ] );
my @json=split /:/, $ua->request($request)->as_string();
for(my $i=0;$i< scalar(@json);$i++)
{
if ($json[$i] =~ /token/)
{
$self->{_TinderToken}=$1 if $json[$i+1] =~ /"(.+?
os_version'=> '800000',
'Accept'=> '*/*',
'platform'=> 'ios',
'Content-Type'=> 'application/json; charset=utf-8',
'Connection'=> 'keep-alive',
'Proxy-Connection'=> 'keep-alive',
'Content-L
cpac_dir /}
= ($page, $limit, $sortby, $dir);
$c->stash->{current_view} = 'AutoCRUD::JSON';
}
sub end : ActionClass('RenderView') {}
sub create : Chained('base') Args(0) {
my ($self
rd($c->stash->{cpac}->{g}->{backend}, 'list_stringified');
}
# send our generated config back in JSON for debugging
sub dumpmeta : Chained('base') Args(0) {
my ($self, $c) = @_;
# strip the
# delete the version as it changes
delete $c->stash->{cpac}->{g}->{version};
$c->stash->{json_data} = { cpac => {
meta => $meta,
conf => $c->stash->{cpac}->{c},
global
$row->primary_columns)
))
);
}
# create a JSON dict for this row's PK
sub _create_JSON_ID {
my $row = shift;
return undef if !defined $row or !blessed $row;
$c->stash->{cpac}->{tc};
my $meta = $c->stash->{cpac}->{tm};
my $response = $c->stash->{json_data} = {};
my @columns = @{$conf->{cols}};
my ($page, $limit, $sort, $dir) =
@{
el($meta->extra('model'))->result_source->storage->debug(1);
}
# make data structure for JSON output
DBIC_ROW:
while (my $row = $rs->next) {
my $data = {};
foreach my
lication/json'], # exported/imported by Settings::Filebrowser, is application/json
wfl => ['Wrangler Field Layout', 'application/json'], # exported/imported by FormEditor, is application/json
wma =>
NAME
Geo::JSON - Perl OO interface for geojson
=head1 VERSION
version 0.005
=head1 SYNOPSIS
use Geo::JSON;
my $obj = Geo::JSON->from_json( $json );
$obj->to_json();
=head1
DESCRIPTION
Convert to and from geojson using Perl objects. GeoJSON objects represent
various geographical positions - points, lines, polygons, etc.
Currently in development - feedback welcome.
Cu
arisons, but will
be read-from and written-to.
=head1 GEOJSON SPECIFICATION
See: L<http://www.geojson.org/geojson-spec.html>
=head1 GEOJSON MEMBERS (ATTRIBUTES)
See the specification for the full
EM_SELECTED EVT_LIST_ITEM_RIGHT_CLICK EVT_MENU EVT_LIST_BEGIN_DRAG);
use base 'Wx::Notebook';
use JSON::XS ();
use Path::Tiny;
sub new {
my $class = shift;
my $parent = shift;
my $self = $class->
howModal == wxID_CANCEL;
my $path = $file_dialog->GetPath;
$file_dialog->Destroy;
my $json = eval { JSON::XS->new->utf8->pretty->encode( { $column_layout => $settings->{wrangler}->config()->{'ui.
tings::FileBrowser::SaveColumnLayout: error encoding fields: $@") if $@;
path($path)->spew_raw($json) or Wrangler::debug("Settings::FileBrowser::SaveColumnLayout: error writing column file: $path: $
MetaJSON
RunExtraTests
PodCoverageTests
PodSyntaxTests
Test::ReportPrereqs
Test::Compile
Test::EOL
Test::Portability
Test::Perl::Critic
Test::UnusedVars
Test::CPAN::Meta::JSON
..',
user_agent => $ua
});
=item schemas_file
Optional path to a file containing the JSON for all of the schemas for this web
service (from the schemas collection). If you would like to
$c = WWW::GoDaddy::REST->new({
url => '...',
schemas_file => '/my/app/schema.json'
});
See the GDAPI Specification for more information about schemas and collections.
L<https:/
Perform the HTTP request and return a hashref of the decoded JSON response.
If this is called in list context, it returns the decoded JSON response and
the associated L<HTTP::Response> object.
This
n clients and workers,
this kind of logic is left to the applications. You can easily implement a JSON-based job broker,
for example, either by taking care of encoding/decoding in the worker code, or
ST::Util qw(abs_url json_encode json_decode is_json );
subtype 'PositiveInt', as 'Int', where { $_ > 0 };
no Moose::Util::TypeConstraints;
my $JSON_MIME_TYPE = 'application/json';
has 'url' => (
=> 'Str',
required => 0,
documentation => 'Optional, cached copy of the schemas JSON to avoid HTTP round trip'
);
has 'schemas' => (
is => 'rw',
isa => 'ArrayRef[
( 'schemas/%s', $specific_name );
return abs_url( $base, $path );
}
sub http_request_schemas_json {
my $self = shift;
my $request = $self->build_http_request( 'GET', $self->schemas_url