#!/usr/bin/perl
##
## json_minify.pl
## Copyright ©2018 Rémi Cohen-Scali
##
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated docu
o process a json file/stream
##
## usage: json_minify.pl -i <afile>.json -o <anoutfile>.json
## cat <afile.json> | json_minify.pl > <anoutfile>.json
## cat <afile.json> | json_minify.pl
-o <anoutfile>.json
## json_minify.pl -i <afile>.json > <anoutfile>.json
##
## -s|--strip for stripping spaces
##
our $VERSION = '1.0';
use strict;
use warnings;
use Getopt::Long;
use Pod::U
package API::Matterbridge::Message;
use strict;
use warnings;
use Moo 2;
use JSON 'decode_json';
use Filter::signatures;
use feature 'signatures';
no warnings 'experimental::signatures';
our $VERSIO
a",
] => (
is => 'ro',
);
sub from_bytes( $class, $bytes ) {
return $class->new( decode_json($bytes))
}
sub reply( $msg, $text, %options ) {
my %reply = (
gateway => $msg->gatew
kes link to repository (git://, git@ or http://) and returns owner of root repository.
=cut
use JSON;
#use YAML::Tiny 1.40;
use LWP::UserAgent;
use Exporter 'import';
our @EXPORT = qw(github_parent
$yaml_content) {
#my $yaml=YAML::Tiny->read_string($yaml_content) or die;
my $yaml=decode_json($yaml_content);
my $source_url=$yaml->{source}{html_url};
die unless $source_url;
ret
$yaml_content) {
#my $yaml=YAML::Tiny->read_string($yaml_content) or die;
my $yaml=decode_json($yaml_content);
return $author unless $yaml->{'fork'};
my $source=$yaml->{source}{owner}{
andard qw(:all);
use Scalar::Util qw(blessed);
use List::MoreUtils qw(uniq);
use Array::Diff;
use JSON;
use Path::Class qw(file);
sub _types_list { qw(
columns
relationships
constraints
table_nam
s a json file and try to decode it:
local $/;
open( my $fh, '<', $file ) or die "Could not open $file: $!";
my $json_text = <$fh>;
close $fh;
my $data = JSON::d
ecode_json($json_text);
return DBIx::Class::Schema::Diff::SchemaData->new({ data => $data });
}
}
return DBIx::Class::Schema::Diff::SchemaData->new({ schema => $v });
}
}
1;
o::JWT::Google;
use utf8;
use Mojo::Base qw(Mojo::JWT);
use Mojo::File qw(path);
use Mojo::JSON qw(decode_json);
use Carp;
our $VERSION = '0.15';
has client_email => undef;
has expires_in => 3600;
class->SUPER::new(%options);
return $self if not defined $self->{from_json};
my $result = $self->from_json($self->{from_json});
return $self;
}
sub claims {
my ($self, $value) = @_;
if (d
m_json {
my ($self, $value) = @_;
croak 'You did not pass a filename to from_json' if not defined $value;
croak 'Cannot find file passed to from_json' if not -f $value;
my $json = decode_json(
efer its documentation for installation.
=back
=cut
use 5.010;
use strict;
use warnings;
use JSON::XS;
use REST::Client;
use HTTP::Status qw/:is/;
use Try::Tiny;
use Aspect;
use Avro::Schema;
u
->new( %config );
$self->{_CLIENT}->addHeader('Content-Type', 'application/vnd.schemaregistry.v1+json');
$self->{_CLIENT}->{_ERROR} = undef; # will be set in case of unsuccessfully responses
$se
eturn undef
unless defined($res);
return $res
if ref($res) eq 'HASH';
return try {
decode_json($res);
} catch {
$res;
}
}
sub _encode_error {
{
error_code => $_[0],
message => $_[1
buy\s+it\s+now
!xi;
our $email = qr!
\@[a-z]+\.[a-z]+
!xi;
our $file = qr!
^\s*
\S+
\.
(xml|js|json)
\s*$
!x;
sub looks_like
{
my ($text) = @_;
if ($text =~ $database_command) {
return "d
luxDB::Client::Simple;
use 5.006;
use strict;
use warnings;
use Carp;
use IO::Socket::INET;
use JSON;
use LWP::UserAgent;
use URI;
=head1 NAME
InfluxDB::Client::Simple - The lightweight InfluxDB c
y $error;
if ( $response->is_success() ) {
local $@;
my $data = eval { decode_json($content) };
$error = $@;
if ($data) {
$error = $data->{error};
nt() );
if ( $response->code() != 204 ) {
local $@;
my $data = eval { decode_json($content) };
my $error = $@;
$error = $data->{error} if ( !$error && $data );
gistry;
use routines;
use Data::Object::Space;
use Scalar::Util ();
# FUNCTIONS
# returns the json-schema-based engine ruleset
fun ruleset() {
state $ruleset = require Rewire::Ruleset;
}
# ret
mfinder https://www.youtube.com/watch?v=6yVIKvcPa6Q https://www.youtube.com/watch?v=6yzVtlUI02w --json
...
_
args => {
urls => {
'x.name.is_plural' => 1,
'x.na
mfinder https://www.youtube.com/watch?v=6yVIKvcPa6Q https://www.youtube.com/watch?v=6yzVtlUI02w --json
...
This function is not exported.
Arguments ('*' denotes required arguments):
=over 4
=item
s;
use strict;
use warnings;
our $VERSION = '1.04';
use Carp qw(croak);
use HTTP::Request;
use JSON;
use LWP::UserAgent;
use constant {
# Core
MIN_SCORE => 0,
MAX_SCORE
esponse = $ua->request($req);
}
if ($self->file || $response->is_success) {
my $json;
if ($self->file) {
{
local $/;
open my $fh,
$json = <$fh>;
close $fh;
}
}
else {
$json = $response->decoded_content;
}
my $result = decode_json $json;
"https://raw.githubusercontent.com/cpanery/rewire/master/ruleset.yaml",
"\$schema" => "https://json-schema.org/draft/2019-09/schema",
definitions => {
Argument => {
anyOf => [
{
"number",
},
ArgumentObject => {
additionalProperties => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
minProperties => 1,
patternProperties => {
"^\\\$[A-Za-z_][A
type => "string",
},
Service => {
additionalProperties => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
minProperties => 1,
not => {
anyOf => [
{
and extends L<Kafka::Consumer|Kafka::Consumer>.
=cut
use 5.010;
use strict;
use warnings;
use JSON::XS;
use IO::String;
use base 'Kafka::Consumer';
use Avro::BinaryDecoder;
use Avro::Schema;
use
es;
use Data::Object::Class;
use Data::Object::ClassHas;
use Data::Object::Space;
use Carp;
use JSON::Validator;
use Rewire::Engine;
with 'Data::Object::Role::Buildable';
with 'Data::Object::Role::
lidate() {
my $engine = $self->engine;
my $json = JSON::Validator->new;
$json->schema($engine->call('ruleset'));
my @errors = map "$_", $json->validate($self->config);
confess join "\n",
nguage system itself.
=cut
__END__
my $req = ZMQx::RPC::Message::Request->new('foo',{ type=>'JSON'},{ foo=>'bar'});
$socket->send_bytes($req->pack);
my $res = ZMQx::RPC::Message::Response->parse(
($res->success) {
say 'yay';
}
my $req = ZMQx::RPC::Message::Request->new('foo',{ type=>'JSON'},{ foo=>'bar'});
$socket->send_bytes($req->pack);
my $res = ZMQx::RPC::Message::Response->parse(
ing the classifier details.
In principle, several configuration file formats are available: XML, JSON,
YAML. However, this program was designed with YAML in mind.
The configuration file defines diff
author determined were either insufficient or overcomplex.
=over
=item * L<Hash::DeepAccess>
=item * L<Data::Deep>
=item * L<Data::Diver>
=item * L<Data::DPath>
=item * L<JSON::Pointer>
=back
cape;
use Encode qw(from_to);
use Data::Dumper;
use Acme::ReturnValue;
use Encode;
use Moose;
use JSON;
with qw(MooseX::Getopt);
use MooseX::Types::Path::Class;
has 'now' => (is=>'ro',isa=>'Str',defa
sa=>'Path::Class::Dir',default=>'htdocs',coerce=>1);
has 'json_decoder' => (is=>'ro',lazy_build=>1);
sub _build_json_decoder {
return JSON->new;
}
sub run {
my $self = shift;
my @inter
?<dist>.*)\.json$/;
my $dist=$+{dist};
$dist=~s/^\///;
my $json = $file->slurp(iomode => '<:encoding(UTF-8)');
my $data = $self->json_decoder->decode($json);
n
to pass to pack()
my %args = (
# Default parameter type. Maybe this should be JSON
type => 'string',
# Default return type. Also valid Item, List an
REST API
our $VERSION = '0.902'; # VERSION
use Moose;
use HTTP::Tiny;
use Log::Any qw($log);
use JSON::MaybeXS;
use Module::Runtime 'use_module';
has 'server' => (
isa => 'Str',
is
rer ' . $self->access_token,
'Accept' => 'application/json',
'Content-Type' => 'application/json',
}
);
}
sub get_current_user {
my $self = shift;
{ content => encode_json($data) } );
}
else {
$res = $self->_client->request( $method, $url );
}
if ( $res->{success} ) {
return decode_json( $res->{content} );