Builder::WebApi::Object::SqlQuery;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
f
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
rs => {
module => 'Dump',
},
),
Output => ordered_hash_ref (
dump_json => {
module => 'JSON',
},
),
);
return \%defaults;
},
);
has 'config' => ( is => 'rw' );
su
aders;
use URI;
use JSON::XS;
use SilverGoldBull::API::Response;
use constant {
API_URL => 'https://api.silvergoldbull.com/',
JSON_CONTENT_TYPE => 'application/json',
TIMEOUT
return LWP::UserAgent->new();
}
);
has 'json' => (
is => 'ro',
init_arg => undef,
isa => 'JSON::XS',
default => sub {
return JSON::XS->new();
}
);
has 'api_url' => ( is
f->api_key,
%{$args->{params} || {}},
);
my $head = HTTP::Headers->new(Content_Type => JSON_CONTENT_TYPE);
$head->header(%params);
my $req = HTTP::Request->new($args->{method},$args->{
s 'Log::Saftpresse::CountersOutput';
use Log::Saftpresse::Utils qw( adj_int_units get_smh);
use JSON;
use Time::Piece;
use Template;
use Template::Stash;
$Template::Stash::LIST_OPS->{ type } = sub
}
return( $self->{_tt} );
}
sub json {
my $self = shift;
if( ! defined $self->{_json} ) {
$self->{_json} = JSON->new->pretty->utf8;
}
return( $self->{_json} );
}
sub template_content {
my
le="width:100%;height:300px"></div>
<script>
$( document ).ready(function() {
var data = [% self.json.encode( series ) %];
var options = {
series: {
stack: 1,
lines: {
show: true,
},
lder::WebApi::Object::QueryColumn;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
f
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
unters to stdout
our $VERSION = '1.6'; # VERSION
extends 'Log::Saftpresse::CountersOutput';
use JSON;
use Data::Dumper;
use Sys::Hostname;
has 'format' => ( is => 'rw', isa => 'Str', default => 'gr
eq 'graphit' ) {
$self->_output_graphit( \%data );
} elsif ( lc $self->format eq 'json' ) {
$self->_output_json( \%data );
} elsif ( lc $self->format eq 'perl' ) {
$self->_output_perl( \%data
) = @_;
print Dumper( $data );
return;
}
sub _output_json {
my ( $self, $data ) = @_;
my $json = JSON->new;
$json->pretty(1);
print $json->encode( $data );
return;
}
1;
__END__
=pod
=enc
gin::Role::Tracking';
use Log::Saftpresse::Log4perl;
use JSON;
has 'json' => (
is => 'ro', isa => 'JSON', lazy => 1,
default => sub { JSON->new; },
);
has 'test_stats' => ( is => 'ro', isa => 'Bo
tash->{'message'} = $msg;
}
# if JSON logging is configured decode JSON
if( $stash->{'message'} =~ /^{/ ) {
my $json_data;
eval {
$json_data = $self->json->decode( $stash->{'message'} );
rn('error while parsing amavis JSON log message: '.$@);
return;
}
if( ref($json_data) ne 'HASH' ) {
return;
}
@$stash{keys %$json_data} = values %$json_data;
}
if( ! defined $sta
r' => '/folder/full/of/json/files',
'extend_with' => ['Store::Dir', 'Value::InfDef'],
'inflate' => sub { JSON::Util->decode($_[0]) },
'deflate' => sub { JSON::Util->encode($_[0]) },
);
my %data = %{$dk->get('abcd.json')};
$dk->set('abcd.json', \%data);
=head1 DESCRIPTION
Uses callback to automatically inflate and deflate.
=cut
use warnings;
use strict;
our $VERSION = '0.0
queue
our $VERSION = '1.6'; # VERSION
extends 'Log::Saftpresse::Input';
use Redis;
use JSON qw(decode_json);
has 'server' => ( is => 'ro', isa => 'Str',
default => '127.0.0.1:6379'
);
has 'sock'
it_all_responses;
foreach my $entry ( grep { defined $_ } @queue ) {
push( @events, decode_json($entry) );
}
return @events;
}
sub eof {
my $self = shift;
return 0; # queues dont have an
h/to/socket"
db = 0
queue = "logs"
</Input>
=head1 Format
Format is expected to be in JSON format.
Each event must be a hash.
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1
der::WebApi::Object::HiddenColumn;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
f
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
presse::Output';
use Log::Saftpresse::Log4perl;
use Time::Piece;
use Search::Elasticsearch;
use JSON;
use File::Slurp;
has 'nodes' => ( is => 'rw', isa => 'Str', default => 'localhost:9200' );
has
my $json_text;
if( defined $self->template_file ) {
$json_text = read_file( $self->template_file );
} else {
$json_text = read_file( \*DATA );
}
return( from_json( $json_te
server
our $VERSION = '1.6'; # VERSION
extends 'Log::Saftpresse::Output';
use Redis;
use JSON qw(encode_json);
has 'server' => ( is => 'ro', isa => 'Str',
default => '127.0.0.1:6379'
);
has 'soc
$output{'@timestamp'} = $output{'time'}->datetime;
delete $output{'time'};
}
encode_json(\%output)
} @events;
$self->_redis->lpush($self->queue, @blobs);
return;
}
1;
__END__
=po
socket"
db = 0
queue = "logs"
</Input>
=head1 Format
The plugin will write entries in JSON format.
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
This
::WebApi::Object::TransformResult;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
f
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
nputs
my $_resource_path = '/getQueryColumns';
$_resource_path =~ s/{format}/json/; # default format to json
my $_method = 'POST';
my $query_params = {};
my $header_params = {};
tent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'text/html');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'text/xml');
my $_body_data;
# body params
if ( exists $args{'query'}) {
$
);
our $VERSION = '0.08';
use MIME::Base64 qw( decode_base64 );
use Protocol::Matrix qw( verify_json_signature );
use constant DESCRIPTION => "Fetch a server's signing key via another server";
use
tary_v2
{
my $self = shift;
my ( $server_name, $via ) = @_;
$self->http_client->request_json(
method => "GET",
server => $via,
path => "/_matrix/key/v2/query/$server_name
);
next unless defined $signing_key;
my $verified = eval { verify_json_signature( $result,
public_key => $signing_key,
origin =>
age HTML::ValidationRules::Legacy;
use strict;
use warnings;
use Mojo::Base 'Exporter';
use Mojo::JSON;
use Mojo::Util qw{decode};
use Mojo::Parameters;
use Scalar::Util qw(blessed);
our @EXPORT_OK =
io' || exists $tag->attr->{checked})) {
$props->{$name}->{$TERM_REQUIRED} = Mojo::JSON->true;
}
}
if (exists $tag->attr->{maxlength}) {
}
});
return {
$TERM_PROPERTIES => $props,
$TERM_ADD_PROPS => Mojo::JSON->false,
};
}
sub validate {
my ($schema, $params, $charset) = @_;
if (! (blesse
sub run
{
my $self = shift;
my ( $opts ) = @_;
my $token;
repeat {
$self->do_json( GET => "/_matrix/client/r0/sync",
params => {
timeout => 30*1000,
if( defined $token or $opts->{initial} ) {
print "---\n";
print $self->JSON_pretty->encode( $body );
}
$token = $body->{next_batch};
Future->done
presence.
# See also
# https://github.com/matrix-org/matrix-doc/issues/734
$self->do_json( GET => "/_matrix/client/r0/sync",
params => {
filter =>
'{"room":{' .
latitude longitude
my $json = $forecast->request(29.7492738082192, -95.4709680410959);
# Human readable summary of daily data
say $json->{daily}->{summary};
=head1 OVERVIEW
die "Type not specified and could not guess it from the filename\n";
}
$self->do_json( POST => "/_matrix/media/r0/upload",
content => $content,
content_type => $type,
)