$raw); # force cloging to set REAL secret
}
# for JSON modules
sub TO_JSON { shift->unwrap }
# for CBOR
sub TO_CBOR { shift->unwrap }
# for JSON, CBOR, Sereal, ...
sub FREEZE {
my ($self, $ser
loud::Object::TextStyleData;
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 Da
turn 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 = {};
eserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if ( exists $args{'format'}) {
$query_params->{'format'} =
ent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
ent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
ent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
ramCloud::Object::DiscUsage;
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 Da
turn 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 = {};
eserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
ent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
ent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
ent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
use HTTP::Request::Common qw(DELETE POST GET HEAD PUT);
use HTTP::Status;
use URI::Query;
use JSON;
use URI::Escape;
use Scalar::Util;
use Log::Any qw($log);
use Carp;
use Module::Runtime qw(
ept' and 'Content-Type' header
my $_header_accept = $self->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
}
# body data
$body_data = to_json($body_data->to_hash) if defined $body_data && $body_data->can('to_hash'); # model to json string
my $_body_data = %$post_params ? $post_p
package Data::AnyXfer::JsonToElasticsearch;
use v5.16.3;
use Moo;
use MooX::Types::MooseLike::Base qw(:all);
extends 'Data::AnyXfer';
with 'Data::AnyXfer::From::JSON';
with 'Data::AnyXfer::To::Ela
';
=head1 NAME
Data::AnyXfer::JsonToElasticsearch - transfer from JSON files to Elasticsearch
=head1 DESCRIPTION
This class combines the L<Data::AnyXfer::From::JSON> and
L<Data::AnyXfer::To::Elast
TRACT: Daemonise RabbitMQ plugin
use Net::AMQP::RabbitMQ 2.300000;
use Carp;
use JSON;
use Try::Tiny;
our $js = JSON->new;
$js->utf8;
$js->allow_blessed;
$js->convert_blessed;
$js->allow_nonref;
ot consumer tag: " . $tag) if $self->debug;
}
my $props = { content_type => 'application/json' };
$props->{reply_to} = $reply_to if defined $reply_to;
# If the queue we're sending to
if $self->debug;
my $json = $js->encode($hash);
utf8::encode($json);
try {
$self->mq->publish($self->rabbit_channel,
$queue, $json, $options, $props);
}
ent changes to CPAN
#pod RECENT-6h.json:
#pod commands:
#pod - curl -O https://www.cpan.org/RECENT-6h.json
#pod
#pod # Parse that JSON file into a CSV using an external pro
ENT-6h.csv:
#pod requires:
#pod - RECENT-6h.json
#pod commands:
#pod - yfrom json RECENT-6h.json | yq '.recent.[]' | yto csv > RECENT-6h.csv
#pod
#pod # Bui
a list of recent changes to CPAN
RECENT-6h.json:
commands:
- curl -O https://www.cpan.org/RECENT-6h.json
# Parse that JSON file into a CSV using an external program
R
,
lazy => 1,
default => sub {
'https://api.hipchat.com/v1/rooms/message?format=json&auth_token=';
},
);
has 'hipchat_token' => (
is => 'rw',
isa => 'Str',
# Add dynamic prereqs to the included modules list (if we can)
my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
if ( $source && $HAS_CPAN_META ) {
if ( my $meta = eval { CPAN::Meta->load_file
);
use Moo;
use Time::Piece;
use Log::Any qw( $LOG );
use File::Which qw( which );
use JSON::PP qw( decode_json );
use Digest::SHA qw( sha1_base64 );
use experimental qw( signatures postderef );
ext
f ) {
system qw( docker start ), $self->name;
}
sub _container_info( $self ) {
state $json = JSON::PP->new->canonical->utf8;
my $output = $self->{_inspect_output};
if ( !$output ) {
( $container ) = $json->decode( $output )->@*;
return $container || {};
}
sub _config_hash( $self ) {
my @keys = grep !/^_|^name$|^cache$/, keys %$self;
my $json = JSON::PP->new->canonic
em $content = $response->value()
Return the content of this response, which is a represents the JSON response as
returned by the Java agent as a hash reference value. This is set only when C<is_ok>
use v5.20;
use warnings;
use autodie qw( :all );
use Moo;
use Log::Any qw( $LOG );
use JSON::PP qw( decode_json );
use HTTP::Tiny;
use Digest::SHA qw( sha1_base64 );
use experimental qw( signatures p
);
die "Could not get token: $res->{content}" unless $res->{success};
my $token = decode_json( $res->{content} )->{token};
my $manifest_uri = sprintf 'https://registry-1.docker.io/v2/%s/m
fest.v2+json",
);
$res = $http->get( $manifest_uri, { headers => \%headers } );
die "Could not get manifest: $res->{content}" unless $res->{success};
my $manifest = decode_json( $res->
);
use Moo;
use Time::Piece;
use Log::Any qw( $LOG );
use File::Which qw( which );
use JSON::PP qw( decode_json );
use Digest::SHA qw( sha1_base64 );
use experimental qw( signatures postderef );
ext
ece->strptime( $created, $iso8601 ) );
return 0;
}
sub _image_info( $self ) {
state $json = JSON::PP->new->canonical->utf8;
my $output = $self->{_inspect_output};
if ( !$output ) {
my ( $image ) = $json->decode( $output )->@*;
return $image || {};
}
sub _config_hash( $self ) {
my @keys = grep !/^_|^name$|^cache$/, keys %$self;
my $json = JSON::PP->new->canonical
MessagePack does not allow perl objects, but we appear
# to have Types::Serialiser in JSON structures
$scalar = encode_base64(nfreeze($data));
}
}
$expire //=
Perl::J4psh::Command);
use JMX::Jmx4Perl::Util;
use JMX::Jmx4Perl::Request;
use Data::Dumper;
use JSON;
=head1 NAME
JMX::Jmx4Perl::J4psh::Command::MBean - MBean commands
=head1 DESCRIPTION
=head1
gent;
use JMX::Jmx4Perl::Agent::Jolokia::Logger;
use JMX::Jmx4Perl::Agent::Jolokia::Verifier;
use JSON;
use Data::Dumper;
use base qw(LWP::UserAgent);
use strict;
my $JOLOKIA_META_URL = "http://www.j
meta_json;
my $cached = undef;
if (!$force) {
$meta_json = $self->_from_cache;
$cached = 1 if $meta_json;
}
$meta_json = $self->_load_from_server unless $meta_json; # T
# loaded
return undef unless $meta_json;
$self->_to_cache($meta_json) unless $cached;
$self->{_meta} = $meta_json;
return $self;
}
=item $meta->initialized()
Return
se Data::Dumper;
use JSON;
=item $is_object = JMX::Jmx4Perl::Util->is_object_to_dump($val)
For dumping out, checks whether C<$val> is an object (i.e. it is a ref but not a
JSON::XS::Boolean) or not
shift;
my $val = shift;
return ref($val) && !JSON::is_bool($val);
}
=item $text = JMX::Jmx4Perl::Util->dump_value($value,{ format => "json", boolean_string =>1})
Return a formatted text repr
is the default and uses
L<Data::Dumper> for creating a textual description and C<json> which return the
result as JSON value. When C<data> is used as format, booleans are returned as 0
for false and