would not normally need to access this.
print $result->response->decoded_content; # prints the JSON return from the api call.
=head1 AUTHOR
Tom Heady <cpan@punch.net>
=head1 COPYRIGHT & LICENSE
64;
use URI::Escape;
use JSON;
use Data::Util qw/:check/;
use REST::Client;
use Data::Dumper;
$CONFLUENCE::REST::VERSION = '0.011';
our $DEBUG_REQUESTS_P = 0;
our $DEBUG_JSON_P = 0;
our $DEBUG_I
while ( my $result = $confluence->next_result ) {
# Print the hashref representing the JSON response
print Dumper $result;
}
=head1 DESCRIPTION
Confluence::REST - Thin wrappe
ent name
$rest->getUseragent->agent(__PACKAGE__);
return
bless {rest => $rest, json => JSON->new->utf8->allow_nonref,} => $class;
}
sub _error {
my ($self, $content, $type, $code)
;
return unless $self->{debug};
# require JSON::PP;
open my $fh, '>>:utf8', 'readline-oo.debug.log';
print $fh $stuff;
# print $fh JSON::PP->new->allow_nonref(1)->encode($stuff) . "\n
Model::Interval;
use Data::Dumper;
use Date::Calc qw( Days_in_Month );
use Exporter 'import';
use JSON;
use Params::Validate qw( :all );
use Text::Table;
use Web::MREST::CLI qw( send_req );
=head1
range,
};
$entity_perl->{'long_desc'} = $long_desc if $long_desc;
my $entity = encode_json $entity_perl;
# send the request
$status = send_req( 'POST', "interval/new", $entity );
"employee" : $EMPLOYEE_OBJECT_JSON,
"tsrange" : "$TSRANGE"
}
}
=cut
sub _interval_report {
my ( $emp, $tsr ) = @_;
my $emp_json = JSON->new->convert_blessed->encode(
You do not normally need to access this.
print $result->response->decoded_content; # prints the JSON return from the api call.
=head1 AUTHOR
Tom Heady <cpan@punch.net>
=head1 COPYRIGHT & LICENSE
er::VERSION = '0.003';
use URI::URL;
use LWP::UserAgent;
use Scalar::Util 'blessed';
use JSON::MaybeXS qw(JSON);
use Net::Mailboxlayer::Error;
use Net::Mailboxlayer::Response;
sub new
{
my ($cl
catch_all)],
_json => JSON->new,
}, $class;
foreach my $prop (qw (endpoint access_key email_address smtp format callback catch_all user_agent_opts user_agent json_decoder))
{
er_agent};
}
sub json_decoder
{
my ($self, $val) = @_;
if ($val and blessed $val and $val->can('decode'))
{
$self->{_json} = $val;
}
return $self->{_json};
}
sub _build_
Mojolicious Plugin for CSS theming
use Mojo::Base 'Mojolicious::Plugin';
use common::sense;
use JSON::MaybeXS;
use Path::Tiny;
use File::ShareDir;
use File::Slurper 'read_binary';
use Image::Size;
u
yles/themes/themes.json");
if (!-f $theme_file)
{
die "'$theme_file' not found";
}
my $theme_txt = path($theme_file)->slurp;
$self->{themes} = decode_json($theme_txt);
hich are NOT exported by this plugin.
=head2 _get_themes
Get the list of themes from the themes.json file.
=head2 _setup_concon
Set up the Config::Context stuff.
=head2 _get_prefix
Get the "pref
ge Zabbix::ServerScript;
use strict;
use warnings;
use Exporter;
use Data::Dumper;
use YAML;
use JSON;
use Log::Log4perl;
use Log::Log4perl::Level;
use Proc::PID::File;
use Proc::Daemon;
use File::Ba
};
# encode_json throws an exception itself, if it cannot encode json.
# This 'croak' stands here just in case encode_json implementation will be changed.
my $request_json = encode_json($request_da
ot encode to JSON: ) . Dumper($request_data));
}
sub _proceed_sender_response {
my ($response_json) = @_;
$response_json =~ s/^.+(?={)//;
my $response_data = decode_json($response_json) or croak(q
_test );
use App::Dochazka::Common::Model::Schedule;
use Data::Dumper;
use Exporter 'import';
use JSON;
use Web::MREST::CLI qw( send_req );
=head1 NAME
App::Dochazka::CLI::Commands::Schedule - Sc
->{'scode'} = $memsched_scode if $memsched_scode;
my $json = encode_json $sched;
my $status = send_req( 'POST', 'schedule/new', $json );
if ( $status->ok ) {
my $sch_obj = App::Do
package Zabbix::ServerScript::API;
use strict;
use warnings;
use Data::Dumper;
use JSON;
use LWP::UserAgent;
use Log::Log4perl;
use Carp;
our $AUTOLOAD;
our $logger;
our $ua;
BEGIN {
eval {
requ
ams;
my $request_hashref = {
jsonrpc => q(2.0),
method => $method_name,
params => $params,
auth => $self->{auth},
id => 1,
};
my $request_json = encode_json($request_hashref);
$logger->d
-Type) => q(application/json-rpc),
q(Content) => $request_json,
);
croak(qq(Cannot make request "$method_name": ) . $res->status_line) if $res->is_error;
my $response_json = $res->content;
$log
];
}
# $METHOD employee eid $JSON
sub _method_employee_eid_json {
my ( $ts, $th ) = @_;
my $method = $ts->[0];
return [ $method, "employee/eid", $th->{_JSON} ];
}
# $METHOD employee eid
$JSON
sub _method_employee_eid_num_json {
my ( $ts, $th ) = @_;
my $method = $ts->[0];
my $eid = $th->{_NUM};
my $json = $th->{_JSON};
return [ $method, "employee/eid/$eid", $json
}
# $METHOD employee nick $JSON
sub _method_employee_nick_json {
my ( $ts, $th ) = @_;
my $method = $ts->[0];
return [ $method, "employee/nick", $th->{_JSON} ];
}
# $METHOD employee ni
p parse);
sue Spp::Builtin qw(read_file to_json);
my $ast = spp($grammar_file, $string_file);
lint($grammar_file);
say to_json($ast);
my $grammar_text = read_file($gramm
@_;
$this->cnc_send_message('cnc out',
CBitcoin::Message::serialize(JSON::encode_json({ 'time' => time() }),'custom_json',$CBitcoin::network_bytes)
);
}
=pod
---+ Broadasting Messages
The
0.1;
package RT::DatabaseSetting;
use base 'RT::Record';
use Storable ();
use MIME::Base64;
use JSON ();
=head1 NAME
RT::DatabaseSetting - Represents a config setting
=cut
=head1 METHODS
=head2
tring is passed through as-is.
=item ContentType
Currently handles C<storable> or C<application/json>.
=back
Returns a tuple of (status, msg) on failure and (id, msg) on success.
Also automaticall
urn $self->_DeserializeContent($content);
}
elsif ($type eq 'application/json') {
return $self->_DeJSONContent($content);
}
return ($content, "");
}
=head2 SetContent
=cut
OpenSSL::X509 1.806;
use CryptX 0.034;
use Crypt::PK::ECC;
use Digest::SHA qw(sha256);
use JSON qw(decode_json);
use parent 'Exporter::Tiny';
our @EXPORT_OK = qw(u2f_challenge u2f_registration_verify
't decode client data; not valid Base64-URL?"
unless $client_data;
{
my $data = decode_json($client_data);
croak "invalid client data (challenge doesn't match)"
unless $data->{cha
-byte sha256(app ID) (application parameter)
# 32-byte sha256(client data (JSON-encoded)) (challenge parameter)
# key handle
# 65-byte key
my $app_id_sha = sha25
ent> object inside the L<JIRA::REST|JIRA::REST> object being used.
=head2 B<JSON>
An accessor that returns the L<JSON|JSON> object inside the L<JIRA::REST|JIRA::REST> object being used.
=head2 B<ma
=> $expected->{name},
#pod data => $expected->{data},
#pod });
#pod $got = $test->JSON->decode($results->decoded_content);
#pod }
#pod catch {
#pod $results = $_;
#pod diag($te
e => "Bug",
#pod self => "$host/rest/api/latest/issuetype/10004",
#pod subtask => JSON::PP::false,
#pod });
#pod };
#pod
#pod =end testing
#pod
#pod =cut
#------------------------
ent> object inside the L<JIRA::REST|JIRA::REST> object being used.
=head2 B<JSON>
An accessor that returns the L<JSON|JSON> object inside the L<JIRA::REST|JIRA::REST> object being used.
=head2 B<ma
or stringify, format: 'json'||'yaml'
$conf->parse(format => '{"k":"v"}')
$string = $conf->stringify('format')
# save or load, format (may be ommitted): 'auto'||'json'||'yaml'
$conf->l
e('k.v')
=head1 DESCRIPTION
Flexconf is base for configuration management
=cut
use Flexconf::Json;
use Flexconf::Yaml;
sub new {
my ($package, $data) = @_;
my $self = bless {data => $data},
f::Json' if 'json' eq $type;
return 'Flexconf::Yaml' if 'yaml' eq $type;
die 'wrong conf format'
}
sub type_by_filename {
my ($self, $filename) = @_;
return 'json' if $filename =~ /\.json$/;
4000;
use strict;
use warnings;
use parent qw/Exporter/;
use HTTP::Tiny;
use Hash::Inflator;
use JSON::MaybeXS;
use Time::HiRes qw/time sleep/;
our $VERSION = '0.001001';
our %cache;
our $last_requ
cache{$url} = do_request $url, @$result
}
decode_json $cache{$url}->[0]
}
sub boards {
my ($self) = @_;
my $result = $self->requestf('boards.json');
$result = $result->{boards} if ref $result eq
$board) = @_;
$board = $board->{board} if ref $board;
my $result = $self->requestf('%s/threads.json', $board);
my @pages = map { Hash::Inflator->new($_) } @$result;
wantarray ? @pages : \@pages
}
request(
$self->create_request(
PUT => $self->path,
undef, $self->json->encode($self->as_hashref)
)
);
if ($res->is_success) {
return 1;
}