:Object::DimensionStatusCode;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
Fastly::Object::Usagemetrics;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
s',
);
has json => (
is => 'ro',
isa => Bool,
lazy => 1,
default => 0,
);
has _json_encoder => (
is => 'ro',
isa => InstanceOf ['Cpanel::JSON::XS'],
lazy => 1,
default => sub {
require Cpanel::JSON::XS;
return Cpanel::JSON::XS->new;
},
);
has lint => (
is => 'ro',
isa => Bool,
lazy => 1,
defa
;
my $after = shift;
my $after_deleted = !$after;
my $json;
my $justification;
if ( $self->json ) {
my $loc = { start => { line => $include->line_number } };
ect::DimensionAttributesRate;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
e::Fastly::Object::LogRecord;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
jo::Util/humanize_bytes>
=head2 json_load
my $hash = json_load( $file );
Loads JSON file and returns data as perl struct
=head2 json_save
my $path = json_save( $file, {foo => [1, 2], bar
=> 'hello!', baz => \1} );
Save perl struct to file as JSON document and returns the L<Mojo::File> object
=head2 md5sum
my $md5 = md5sum( $file );
See L<Digest::MD5>
=head2 parse_expire
Dep
eil strftime /;
use Digest::MD5;
use Mojo::Util qw/ trim monkey_patch /;
use Mojo::JSON qw/ decode_json encode_json /;
use Mojo::File qw/ path /;
use WWW::Suffit::Const qw/ IS_TTY DATE_FORMAT DATETI
objects in the list.
=item * C<to_json> (a boolean value; available as of version 1.3.0)
If the C<to_json> option is set to true, the builder creates a C<TO_JSON()>
method (object method). This def
ES
The API currently supports only JSON as an exchange format. Be sure to set both the C<Content-Type>
and C<Accept> headers for every request as C<application/json>.
All Date objects are returned i
All requests that result in an error return the appropriate 4xx or 5xx error code with a custom JSON
error object:
{
"code": "E0001",
"error": "API validation failed",
"status
package WWW::Suffit::JWT;
use strict;
use utf8;
=encoding utf8
=head1 NAME
WWW::Suffit::JWT - JSON Web Token for Suffit authorization
=head1 SYNOPSIS
use WWW::Suffit::JWT;
my $jwt = WWW:
d;
die $jwt->error if $jwt->error;
=head1 DESCRIPTION
JSON Web Token for Suffit authorization
This module based on L<Mojo::JWT>
JSON Web Token is described in L<https://tools.ietf.org/html/rfc
ing new ones
=head2 decode
my $payload = $jwt->decode($token)->payload;
Decode and parse a JSON Web Token string and return the payload hashref (see L</payload>).
=head2 encode
my $token
=head2 sourcefile
sourcefile => '/tmp/authdb.json'
Path to the source file in JSON format
$authdb = $authdb->sourcefile("/tmp/authdb.json");
my $sourcefile = $authdb->sourcefile;
Defa
ds => "sqlite:///tmp/auth.db?sqlite_unicode=1",
sourcefile => "/tmp/authdb.json"
);
die $authdb->error if $authdb->error;
Create new AuthDB object
=head2 cache
tion with database. See also L</cached> attribute
=head2 dump
print $authdb->dump;
Returns JSON dump of loaded authentication database
=head2 group
my $group = $authdb->group("manager");
tent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$he
arset=utf-8",
CONTENT_TYPE_TXT => "text/plain; charset=utf-8",
CONTENT_TYPE_JSON => "application/json",
# Server
SERVER_UPGRADE_TIMEOUT => 30,
SERVER_TIMEOUT => 60,
AULT_ALGORITHM
/],
'MIME' => [qw/
CONTENT_TYPE_HTML CONTENT_TYPE_TXT CONTENT_TYPE_JSON
/],
'MISC' => [qw/
USERNAME_REGEXP EMAIL_REGEXP
JWT_REGEXP JTI_REGEXP
All
attributes will be probed from ffprobe output unless noted otherwise.
=cut
use JSON::MaybeXS qw(decode_json);
use Media::Convert::CodecMap qw/detect_to_write/;
use Moose;
=head2 url
The file
open my $jsonpipe, "-|:encoding(UTF-8)", "ffprobe", "-loglevel", "quiet", "-print_format", "json", "-show_format", "-show_streams", $self->url;
my $json = "";
while(<$jsonpipe>) {
$json .= $_;
}
close $jsonpipe;
return decode_json($json);
}
return {};
}
sub _probe_audiodata {
my $self = shift;
if(!exists($self->_get_probedata->{streams})) {
return {};
}
foreach my $stream(@{$
DEFAULT NULL, -- Private Key (RSA/X509)
"attributes" TEXT DEFAULT NULL, -- Attributes (JSON)
"comment" TEXT DEFAULT NULL -- Comment
);
CREATE TABLE IF NOT EXISTS "grou
DEFAULT NULL, -- Private Key (RSA/X509)
`attributes` TEXT DEFAULT NULL, -- Attributes (JSON)
`comment` TEXT DEFAULT NULL, -- Comment
PRIMARY KEY (`id`),
UNIQUE
EXT DEFAULT NULL, -- Private Key (RSA/X509)
"attributes" TEXT DEFAULT NULL, -- Attributes (JSON)
"comment" TEXT DEFAULT NULL -- Comment
) ;
CREATE TABLE IF NOT EXISTS "groups" (
"
:Convert::Normalizer::Ffmpeg;
use Moose;
extends 'Media::Convert::Normalizer';
use JSON::MaybeXS qw/decode_json/;
use Symbol 'gensym';
use IPC::Open3;
use Media::Convert::CodecMap qw/detect_to_writ
0:print_format=json", "-f", "null", "-");
print "Running: '" . join("' '", @command) . "'\n";
open3 (my $in, my $out, my $ffmpeg = gensym, @command);
my $json = "";
my $reading_json = 0;
while(<$
) {
$reading_json++;
}
if($reading_json) {
$json .= $_;
}
if(/}/) {
$reading_json--;
}
}
$json = decode_json($json);
# TODO: abs
e HTTP::Tiny;
use JSON::PP;
use Local::ViaExporter ();
use Test::Builder ();
use POSIX ();
my @foo = List::Util::uniq( 0 .. 10 );
my $bar = encode_json( {} );
my $hr = JSON::PP->new;
local *
package Media::Convert::Pipe;
use JSON::MaybeXS qw(decode_json);
use Moose;
use Carp;
use autodie qw/:all/;
=head1 NAME
Media::Convert::Pipe - class to generate ffmpeg command lines with Media::Co
package Media::Convert::FfmpegInfo;
use MooseX::Singleton;
use SemVer;
use JSON::MaybeXS;
has 'codecs' => (
is => 'ro',
isa => 'HashRef',
lazy => 1,
builder => '_build_codecs',
);
sub _build_co
fprobe -loglevel quiet -show_program_version -print_format json";
local $/ = undef;
my $json = decode_json(<$ffprobe>);
my $version = $json->{program_version}{version};
if($version =~ /([0-9.]+)/)
);
my $attributes = $user->attributes;
Sets or returns additional attributes of the user in JSON format
Default: none
=head2 cached
$user = $user->cached( 12345.123456789 );
my $cache
ply.json_error
return $c->reply->json_error(); # 500, E0500, "Internal server error"
return $c->reply->json_error("Error message"); # 500, E0500, "Error message"
return $c->reply->json_er
reply->json_error(501 => "Error code" => "Error message");
{
"code": "Error code",
"message": "Error message",
"status": false
}
The method returns API error as JSON respon
se
=head2 reply.json_ok
return $c->reply->json_ok(); # 200, ""
return $c->reply->json_ok("Ok."); # 200, "Ok."
return $c->reply->json_ok(201 => "Ok."); # 201, "Ok."
{
"code": "