' ]
);
}
sub abstract { "Deploy patches from <home>/plan.json in the DB" }
sub description { "Deploys patches from <home>/plan.json in the DB and records their applications in the Meta tables" }
u::Util qw(:is);
use Catmandu::Store::MongoDB::Searcher;
use Catmandu::Hits;
use Cpanel::JSON::XS qw(decode_json);
use Moo;
use Catmandu::Store::MongoDB::CQL;
use namespace::clean;
with 'Catmandu::Ba
e a string query is a JSON encoded MongoDB query
sub normalize_query {
my ($self, $query) = @_;
return $query if ref $query;
return {} if !$query;
decode_json($query);
}
# assume
my ($self, $sort) = @_;
return $sort if ref $sort;
return {} if !$sort;
decode_json($sort);
}
sub drop {
$_[0]->collection->drop;
}
1;
__END__
=pod
=head1 NAME
Catmandu::S
$app ) = @_;
return (
[ 'home=s' =>
"The home directory where the plan.json lives" ],
[ 'dsn=s' =>
"The DSN to connect to the DB. See https://metacpan.
sub ( $e, $err ) { warn "This looks bad: $err" } );
$tx->on(
json => sub ( $tx, $msg = () ) {
if ( $msg->{stream} eq 'authorization' ) {
}
);
$tx->send(
{
json => {
action => 'authenticate',
data =>
$s->tx->send( { json => { action => 'listen', data => {%params} } } );
}
sub unsubscribe ( $s, %params ) { # XXX - Grep current list
$s->tx->send( { json => { action => 'list
($self) = @_;
my $content = File::Slurp::read_file( $self->file() );
return $self->jesp->json->decode( $content );
}
sub _build_patches{
my ($self) = @_;
unless( $self->raw_data()->{
#$tx->on( finish => sub { $promise->resolve } );
$tx->on(
json => sub ( $tx, $msgs ) {
for my $msg (@$msgs) {
$tx->send(
{
json => {
action => 'auth',
$tx->send(
{
json => {
action => 'auth',
per>
This is used by the parsing module L<Unicode::Confuse::Parse>.
=item L<JSON::Parse>
This is used to parse the JSON-formatted file of confusables
distributed with the module.
=back
=head1 BU
ault store
reads documents in YAML and writes pages to a file, but stores could read
documents as JSON, or from a Mongo database, and write pages to a database, or
wherever you want!
=over 4
=item L
t;
use warnings;
our %layout_modules = (
Pattern => {format=>'[%d] %m'},
LTSV => {},
JSON => {},
YAML => {},
);
our $scenario = {
modules => {
},
participants => [
JSON> 0.002
L<Log::ger::Layout::LTSV> 0.006
L<Log::ger::Layout::Pattern> 0.007
L<Log::ger::Layout::YAML> 0.001
=head1 BENCHMARK PARTICIPANTS
=over
=item * baseline (command)
=item * load-JSON
(command)
L<Log::ger::Layout::JSON>
=item * load-LTSV (command)
L<Log::ger::Layout::LTSV>
=item * load-Pattern (command)
L<Log::ger::Layout::Pattern>
=item * load-YAML (command)
L<Log::g
use warnings;
our $VERSION = '0.005';
use parent qw( SMS::Send::Driver );
use HTTP::Tiny;
use JSON;
our $URL = "https://apis.aligo.in";
our $AGENT = "SMS-Send-KR-Aligo/" . $SMS::Send::KR::A
id response for POST request";
if ( $res && $res->{success} ) {
$ret{detail} = decode_json( $res->{content} );
if ( $ret{detail}{result_code} >= 0 ) {
$ret{success} = 1
e uri_unescape);
use POSIX qw(strftime);
use Date::Parse qw();
use File::Spec qw();
use JSON::XS qw();
use MIME::Base64 qw();
use Authen::NZRealMe::CommonURIs qw(URI NS_PAIR);
use Authe
:Identity',
ivs => 'urn:nzl:govt:ict:stds:authn:safeb64:attribute:igovt:IVS:Assertion:JSON:Identity',
avs => 'urn:nzl:govt:ict:stds:authn:safeb64:attribute:NZPost:AVS:Assertion
my $json = JSON::XS::decode_json($data);
my $dob = $json->{dateOfBirth} or warn "dateOfBirth field is not in JSON IVS";
my $name = $json->{name} or warn "name field is not in JSON IVS
().
use overload fallback => 1, '&{}' => sub { $_[0][4] };
use Carp 1.25 ();
use HTTP::Tiny;
use JSON::PP ();
use WebDriver::Tiny::Elements;
our @CARP_NOT = 'WebDriver::Tiny::Elements';
sub import
= $reply->{capabilities};
# Numify bool objects, saves memory.
$_ += 0 for grep ref eq 'JSON::PP::Boolean', values $self->[3]->%*;
# See the overloading at the top of the file for detai
hod,
$self->[1] . $path,
{ content => JSON::PP::encode_json( $args // {} ) },
);
my $value = eval { JSON::PP::decode_json( $reply->{content} )->{value} };
unless ( $reply
r_vs_fastest=>1.04705678380182,rate=>70,samples=>20,time=>10},{errors=>8.9e-06,participant=>"load-JSON",pct_faster_vs_slowest=>0.142949053108802,pct_slower_vs_fastest=>0.791030648508664,rate=>78.8,sam
,type=>"command"},{include_by_default=>1,module=>"Log::ger::Layout::JSON",name=>"load-JSON",perl_cmdline=>["-mLog::ger::Layout::JSON","-e1"],seq=>1,type=>"command"},{include_by_default=>1,module=>"Log
func.module_versions"=>{"Benchmark::Dumb"=>0.111,"Devel::Platform::Info"=>0.16,"Log::ger::Layout::JSON"=>0.002,"Log::ger::Layout::LTSV"=>0.006,"Log::ger::Layout::Pattern"=>0.007,"Log::ger::Layout::YAM
mport('Load');
}
if (eval { require JSON::XS }) {
JSON::XS->import('decode_json')
}
else {
require JSON::PP;
JSON::PP->import('decode_json');
}
}
sub new {
bless {}, shift
open file $file";
my $content = <$fh>;
close $fh;
if ($file =~ /\.json$/) {
push @defs, decode_json($content);
}
else {
push @defs, Load($content);
}
}
merg
f /\.(yml|yaml|json)$/ }, $_[1];
@files
}
1
__END__
=head1 NAME
OpenAPI::Generator::From::Definitions - Generate openapi single definition from several definitions in yaml or json!
=head1 SYNOP
when integrating with RealMe, the FLT will now also be
returned in the response, in either XML or JSON format (another option at
integration time). The iCMS back-channel is thus no longer required wit
ity functions to reduce dependencies
use Statocles::Base;
use Exporter 'import';
use Mojo::JSON qw( to_json );
our @EXPORT_OK = qw(
trim dircopy run_editor uniq_by derp read_stdin
);
#pod =sub
set of arguments.
#pod
#pod =cut
our %DERPED;
sub derp(@) {
my @args = @_;
my $key = to_json \@args;
return if $DERPED{ $key };
if ( $args[0] !~ /\.$/ ) {
$args[0] .= '.';
n/rss+xml',
atom => 'application/atom+xml',
js => 'application/javascript',
json => 'application/json',
);
has type => (
is => 'ro',
isa => Str,
lazy => 1,
default => sub
use Mojo::Base -strict;
use Test::More;
use_ok('Mojo::JSON_XS');
diag "Testing Mojo::JSON_XS $Mojo::JSON_XS::VERSION, Perl $], $^X";
done_testing();
atocles::Role::PageAttrs';
use Statocles::Image;
use Statocles::Util qw( derp );
use YAML ();
use JSON::PP;
#pod =attr path
#pod
#pod The path to this document. This is not settable from the frontmat
ment> object.
#pod
#pod This parses the YAML or JSON frontmatter into the document's attributes,
#pod putting the rest of the file after the YAML or JSON frontmatter in the
#pod C<content> attribute.
}
# JSON frontmatter
elsif ( @lines && $lines[0] =~ /^{/ ) {
my $json;
if ( $lines[0] =~ /\}$/ ) {
# The JSON is all on a single line
$json = shift @
A straight copy of Mojolicious@5.68:t/mojo/json.t (c) Sebastian Riedel
package JSONTest;
use Mojo::Base -base;
has 'something' => sub { {} };
sub TO_JSON { shift->something }
package main;
use Mo
se Mojo::JSON_XS;
use Mojo::JSON qw(decode_json encode_json false from_json j to_json true);
use Mojo::Util 'encode';
use Scalar::Util 'dualvar';
sub _cpanel_version { !! eval { Cpanel::JSON::XS->VER
ray
my $array = decode_json '[]';
is_deeply $array, [], 'decode []';
$array = decode_json '[ [ ]]';
is_deeply $array, [[]], 'decode [ [ ]]';
# Decode number
$array = decode_json '[0]';
is_deeply $arr