package Forex;
use JSON::XS;
use DateTime;
use LWP::UserAgent;
our $LASTERROR = undef;
$VERSION = '1.2';
=pod
=head1 NAME
Forex - Historic Foreign Exchange Rates from Open Exchange Rates
=hea
e->is_success )
{ $self->{ 'CONTENT' } = decode_json $response->decoded_content; $LASTERROR = undef; }
else
{ $self->{ 'ERROR'} = decode_json $response->decoded_content;
$LASTERROR = 1; }
->{'API_HOOK' },
'historical' ,
$request_day->ymd('-') . '.json' );
$self->{'REQUEST_URL'} .= '?app_id=' . $self->{'APP_ID'}
. "&base=" . $se
{ type => 'text/javascript' },
"\n//<![CDATA[\n"
. "var RecaptchaOptions = "
. $h->json_encode( $options )
. ";\n//]]>\n"
) . "\n";
}
sub get_html {
my $self = shift;
my ( $
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",
Go APIs
use Moo;
use LWP::UserAgent;
use HTTP::Request;
use WWW::DuckDuckGo::ZeroClickInfo;
use JSON;
use URI;
use URI::QueryParam;
our $VERSION ||= '0.0development';
has _duckduckgo_api_url => (
;
my %params = %{$self->params};
$uri->query_param( q => $query );
$uri->query_param( o => 'json' );
$uri->query_param( kp => -1 ) if $self->safeoff;
$uri->query_param( no_redirect => 1 );
_by_response {
my ( $self, $response ) = @_;
if ($response->is_success) {
my $result = decode_json($response->content);
return $self->_zeroclickinfo_class->by($result);
} else {
die __PACKAGE
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
ans that text/html gets picked first
req.setRequestHeader(
'Accept',
'text/x-json; q=1.1'
);
req.onreadystatechange = function() {
if (req.readyState == 4)
);
};
req.send(null);
}
function handleUploadProgressResults(results) {
var state = JSON.parse(results);
if ( state != undefined ) {
state.starttime = progress.startt
data = data();
else if (typeof data == 'string') {
Ajax.get(data, function(r) { proc(JSON.parse(r)) });
return;
}
return proc(data);
}
//--------------------------------
el';
use Data::Dumper;
use Data::DPath 'dpath';
use DateTime;
use JSON;
use YAML::XS;
use Data::Structure::Util 'unbless';
has debug
ta) = @_; dpath($path)->match($data); };
$Template::Stash::LIST_OPS->{to_json} = sub { JSON->new->pretty->encode(unbless $_[0]) };
$Template::Stash::LIST_OPS->{to_
5.008001;
use JSON ();
use Furl::HTTP;
use MIME::Base64;
use ArangoDB::ConnectOptions;
use ArangoDB::ServerException;
use Class::Accessor::Lite ( ro => [qw/options/] );
my $JSON = JSON->new->utf8;
my ( $self, $path, $data, $raw, $additional_headers ) = @_;
if( !$raw ){
$data = $JSON->encode( defined $data ? $data : {} );
}
my $headers = $self->_build_headers($data, $addi
my ( $self, $path, $data, $raw, $additional_headers ) = @_;
if( !$raw ){
$data = $JSON->encode( defined $data ? $data : {} );
}
my $headers = $self->_build_headers($data, $addi
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.
package ArangoDB::Collection;
use strict;
use warnings;
use utf8;
use 5.008001;
use JSON ();
use Carp qw(croak);
use Scalar::Util qw(weaken);
use Class::Accessor::Lite ( ro => [qw/id status/], );
use
goDB::ClientException;
use overload
q{""} => sub { shift->id },
fallback => 1;
my $JSON = JSON->new->utf8;
=pod
=head1 NAME
ArangoDB::Collection - An ArangoDB collection
=head1 DESCRIP
ut
sub wait_for_sync {
my $self = shift;
if ( @_ > 0 ) {
my $val = $_[0] ? JSON::true : JSON::false;
my $res = $self->_put_to_this( 'properties', { waitForSync => $val } );
trict;
use warnings;
use Carp ();
use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK SEEK_SET SEEK_END);
use JSON;
use Net::OAuth;
use URI;
use URI::Escape;
our $VERSION = '1.13';
my $request_token_url = 'http
t
request_token
request_secret
access_token
access_secret
root
no_decode_json
error
code
request_url
request_method
timeout
lwp_env_proxy
/);
$WebServ
timeout => $args->{timeout} || (60 * 60 * 24),
no_decode_json => $args->{no_decode_json} || 0,
no_uri_escape => $args->{no_uri_escape} || 0,
lwp_env_proxy
ge ArangoDB::Statement;
use strict;
use warnings;
use utf8;
use 5.008001;
use Carp qw(croak);
use JSON ();
use Scalar::Util qw(weaken);
use ArangoDB::Cursor;
use ArangoDB::BindVars;
use ArangoDB::Cons
;
my $data = {
query => $self->{query},
count => $options->{do_count} ? JSON::true : JSON::false,
};
if ( $self->{bind_vars}->count > 0 ) {
$data->{bindVars} = $se
if the URI query string is ?progress_id=<id> intercept the request
# and display the progress JSON.
my $query = $c->req->uri->path_query;
if ( $c->req->method eq 'GET' && $query =~ m{\?pro
};
}
# format the progress data as JSON
my $json = '{"size":%d,"received":%d,"aborted":%d}';
my $output = sprintf $json,
$progress->{size},
$progress->{rec
no-cache, must-revalidate, post-check=0, pre-check=0' );
$c->response->content_type( 'text/x-json' );
$c->response->body( $output );
}
sub upload_progress_javascript {
my $c = shift;
% 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';
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",
o declare L<Moose> type constraints to validate nested
data structures as you may get back from a JSON web service or something along
those lines. The doctype declaration can be any arbitrarily nested
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
resource_list {
my ($c) = @_;
$c->getopt( 'name=s@', 'id=i@', 'active', 'free', 'json', 'verbose|v', 'help|?' );
if ( $c->options->{help} ) {
say STDERR "$0 re
" --verbose Show extended information";
say STDERR " --json Give results as json";
say STDERR " --help Show this help";
ies = $resources->all;
if ($c->options->{json}) {
require JSON;
my @json_resources;
push @json_resources, {
id => $_->
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
#!/usr/bin/env perl
use strict;
use warnings;
require JSON::XS;
require Tapper::Model;
my $or_dbh = Tapper::Model::model()->storage->dbh;
my $ar_chart_lines = $or_dbh->selectall_arrayref(
lines} ) {
my $hr_json;
eval {
$hr_json = JSON::XS::decode_json( $hr_chart_line->{chart_line_statement} );
};
if ( $@ ) {
warn "cannot parse json string: $@";
}
else {
if ( $hr_json->{where} ) {
for my $ar_where_clause ( @{$hr_json->{where}} ) {
my $s_operator = shift @{$ar_where_clause};
my $s_column =
{ type => 'text/javascript' },
"\n//<![CDATA[\n"
. "var RecaptchaOptions = "
. $h->json_encode( $options )
. ";\n//]]>\n"
) . "\n";
}
=item C<< get_options_setter_div( $pubkey,