irebase::Auth::VERSION = '1.0002';
use strict;
use warnings;
use Digest::SHA qw(hmac_sha256);
use JSON::XS;
use POSIX;
use MIME::Base64;
use Moo;
use Ouch;
has token_version => (
is => 'rw'
) = @_;
my $ejsn = JSON::XS->new->utf8->space_after->encode ({'typ'=> 'JWT', 'alg'=> 'HS256'}) ;
my $encoded_header = $self->urlbase64_encode( $ejsn);
my $eclm = JSON::XS->new->utf8->space
ver, you may be interested in his alternative
query distribution L<CPAN::Testers::Reports::Query::JSON>.
Initially released during the 2012 QA Hackathon in Paris.
=head1 CPAN TESTERS FUND
CPAN Test
Firebase::Auth;
use HTTP::Thin;
use HTTP::Request::Common qw(DELETE PUT GET POST);
use Ouch;
use JSON;
use URI;
has firebase => (
is => 'ro',
required => 1,
);
has auth => (
te_uri($path);
my $request = POST($uri->as_string, Content_Type => 'form-data', Content => to_json($params));
$request->method('PUT'); # because HTTP::Request::Common treats PUT as GET rather
te_uri($path);
my $request = POST($uri->as_string, Content_Type => 'form-data', Content => to_json($params));
$request->method('PATCH'); # because HTTP::Request::Common treats PUT as GET rathe
desirable.
This module is handy when programming a serialization strategy for
a Perl object into JSON where datatypes affect the output.
=head1 EXPORTED SUBROUTINES
All subroutines are exported by
^{)) { return ('string', $what) } # json string
if ($what =~ m{^\[}) { return ('string', $what) } # json string
if ($what =~ m{\n[\s\w]}) { return ('s
sed to L<File::Spec/catfile>
as portable file addressing).
First time I've used L<IO::Any> for L<JSON::Util> where for the functions
to encode and decode needs to read/write data.
=head1 METHODS
=h
ne => $line ,name => $name};
}
};
my $content = WebService::Heartrails::Express::Provider::Common::call($class,$sub_url);
return JSON::decode_json($content)->{response}->{station};
}
1;
;
use warnings;
use utf8;
use constant API_ENDPOINT => 'http://express.heartrails.com/api/json?';
use JSON;
use Encode;
use URI;
sub call{
my($class,$sub_url) = @_;
my $uri = URI->new(API_ENDPO
ckage WWW::Jugem::API;
use 5.008005;
use strict;
use warnings;
use utf8;
use Mouse;
use Furl;
use JSON;
our $VERSION = "0.01";
use constant BASE_URL => 'http://api.jugemkey.jp/api/horoscope/free/';
lf->date;
my $url = BASE_URL.$date;
my $response = $self->furl->get($url);
my $content = JSON::decode_json($response->content);
return $content->{horoscope}->{$date}->[$star_chart{$star}];
}
1;
t AREA_ENDPOINT => 'http://express.heartrails.com/api/json?method=getAreas';
use constant PREF_ENDPOINT => 'http://express.heartrails.com/api/json?method=getPrefectures';
sub _build_areas{
my $self
= JSON::decode_json($response->{content});
return $content->{response}->{area};
}
sub _build_prefs{
my $self = shift;
my $response = $self->provider->furl->get(PREF_ENDPOINT);
my $content = JSON:
:decode_json($response->{content});
return $content->{response}->{prefecture};
}
no Mouse;
__PACKAGE__->meta->make_immutable;
1;
__END__
=encoding utf-8
=head1 NAME
WebService::Heartrails::Expr
D => sub {
my $self = shift;
$self->setup_prebuild_test(sub {
require HTTP::Tiny;
require JSON::PP;
my $url = "https://api.metacpan.org/v0/release/".$self->name;
my $res = HTTP::Tiny::-
ew->get($url);
return $self->log("Could not fetch $url") unless $res->{success};
my $nfo = JSON::PP::->new->decode($res->{content});
my $ver = $nfo->{version}
or return $self->log("Could n
# ignore scripts
\.(gif|png|jpg) | # ... images
\.(readme|meta|yml|json|changelog) | # ... package files
\.(asc|pdf|ppm|patch|pod|txt) $ # ... docs and pa
query_parse );
use constant description => <<'DESCRIPTION';
Output formats are: SSE (default), JSON, YAML, SPARQL.
DESCRIPTION
use constant opt_spec => (
[ 'execute|e=s', 'Query to parse' ]
' options.")
if exists $opt->{sparql_file} && exists $opt->{execute};
}
sub execute
{
require JSON;
require YAML::XS;
require RDF::Query;
my ($self, $opt, $arg) = @_;
my $sparql = $self->_
putFile',
);
foreach my $out (@outputs)
{
my $str;
if ($out->format =~ /json/i)
{ $str = JSON::to_json( $query->as_hash, {pretty=>1,canonical=>1} ) }
elsif ($out->format =~ /ya?ml/i)
d1 Configuration and Environment
Reads configuration from F<~/.yakuakue_sessions/yakuake_session.json> which
might look like;
{
"doc_title": "Perl",
"tab_title": "Oo.!.oO"
}
See t
m C<storage_class>
File format used to store session data. Defaults to the config class
value; C<JSON>
=back
Modifies these methods in the base class
=over 3
=item C<run>
=back
=head1 Subroutin
$App::perlrdf::FileSpec::VERSION = '0.006';
}
use Moose;
use Moose::Util::TypeConstraints;
use JSON;
use PerlX::Maybe;
use RDF::Trine;
use URI;
use URI::file;
use namespace::clean;
class_type Path
=> 1,
);
sub DEFAULT_STREAM
{
warn "DEFAULT_STREAM is 'stdout:'\n";
return "stdout:";
}
sub _jsonish
{
my ($self, $str) = @_;
$str =~ s/(^\{)|(\}$)//g; # strip curlies
my $opts = {};
while
$name) = ($spec =~ m<^ (\{ .*? \}) (.+) $>x)
? ($1, $2)
: ('{}', $spec);
my $opts = $class->_jsonish($optstr);
$class->new(
'uri' => ($name eq '-' ? $class->DEFAULT_STREAM : $name),
c::OutputBindings::VERSION = '0.004';
}
use Any::Moose;
use File::Temp qw(tempfile);
use JSON qw(from_json);
use RDF::Trine;
use Spreadsheet::Wright;
use YAML::XS qw(Dump);
use namespace::clean;
if $self->uri =~ /\.ya?ml/i;
return 'XML' if $self->uri =~ /\.xml/i;
return 'JSON' if $self->uri =~ /\.json/i;
return 'CSV' if $self->uri =~ /\.csv/i;
return 'XLS' if $self->uri =~
@_;
if ($self->format =~ /json/i)
{
$self->handle->print($iter->as_json);
}
elsif ($self->format =~ /yaml/i)
{
$self->handle->print(Dump from_json($iter->as_json));
}
elsif ($self->format
es, URLs or streams to operate on.
FileSpecs have a two part syntax. They start with an optional JSON-like
options specification, and are followed by a (non-optional) file name, URL or
dash. Some exa
tp://www.example.com/data.rdf
{format:"Turtle",base:"http://www.example.net/"}-
The optional JSON-like part is a list of key-value pairs, where pairs are
separated with commas, and keys are seper
t, $args) = @_;
if (@$args)
{
require App::perlrdf::FileSpec;
say
App::perlrdf::FileSpec->new_from_filespec($_)->TO_JSON(1),
for @$args;
}
else
{
say $class->description;
}
}
1;
js/locale_simple.js"></script>
<script language="javascript" src="locale/de_DE/LC_MESSAGES/test.json"></script>
ltd('test');
l("Hello");
ln("You have %d message","You have %d messages",4);
hich is wrapped, requires a json file to be
generated out of the po. This can be achieved with po2json which is delivered with
this package. Sadly it only generates the json and doesnt integrate it in
echo -n "locale_data['test'] = " >data/locale/test.json
po2json data/locale/test.po >>data/locale/test.json
echo ";" >>data/locale/test.json
B<WARNING> it could be that the way how to integrat
m C<storage_class>
File format used to store session data. Defaults to the config class
value; C<JSON>
=back
=head1 Subroutines/Methods
None
=head1 Diagnostics
None
=head1 Dependencies
=over 3
ea => $area,prefecture => $prefecture};
}
};
my $content = WebService::Heartrails::Express::Provider::Common::call($class,$sub_url);
return JSON::decode_json($content)->{response}->{line};
}
1;
'getStations',x => $x,y => $y};
}
};
my $content = WebService::Heartrails::Express::Provider::Common::call($class,$sub_url);
return JSON::decode_json($content)->{response}->{station};
}
1;