t;
return $assets->each(
sub {
my ($asset, $index) = @_;
my $attrs = $asset->TO_JSON;
$attrs->{key} = 'html-min';
$attrs->{minified} = 1;
#~
le Vue templates L<Mojolicious::Plugin::AssetPack::Pipe::VueTemplateCompiler>.
Can pipe CSS, JS, JSON, HTML with L<Mojolicious::Plugin::AssetPack::Pipe::CombineFile> into disk cache. This pipe can al
er(validation_json => sub {
my ($c) = @_;
my $v = $c->validation;
my $json = $c->req->json || { };
$json = { } unless ref $json eq 'HASH';
for my $key (keys %$json) {
my $
ot ref $json->{$key}) { $success = 1 }
elsif (ref $json->{$key} eq 'ARRAY') {
# Success only if there are no any refs in array
$success = 1 unless grep { ref $_ } @{$json->{$key
}};
}
$v->input->{$key} = $json->{$key} if $success;
}
return $v;
});
my $reply_headers = sub {
my ($c, $headers, $message) = @_;
$headers->{$conf->{header_message}
JSON::Repair - reformat JSON to strict compliance
=head1 SYNOPSIS
use utf8;
use JSON::Repair 'repair_json';
my $bad_json = <<EOF;
{'very bad':0123,
"
naughty":'json',
00000.00001,
}
// garbage
EOF
print repair_json ($bad_json);
produces output
{"very bad":123,
"\nnaughty":"json",
"value": 0.00001
}
(This example is included as
RSION
This documents version 0.08 of JSON::Repair corresponding to
git commit L<0d223c0746505268a2a620e28a5917f0de928c3f|https://github.com/benkasminbullock/json-repair/commit/0d223c0746505268a2a620e
le Vue templates L<Mojolicious::Plugin::AssetPack::Pipe::VueTemplateCompiler>.
Can pipe CSS, JS, JSON, HTML with L<Mojolicious::Plugin::AssetPack::Pipe::CombineFile> into disk cache. This pipe can al
e namespace::autoclean;
use Types::Standard qw/Str HashRef Maybe/;
use Path::Tiny;
use JSON::MaybeXS 'decode_json';
with 'Badge::Depot';
has user => (
is => 'ro',
isa => Str,
lazy => 1,
my $self = shift;
return {} if !path('META.json')->exists;
my $json = path('META.json')->slurp_utf8;
my $data = decode_json($json);
return {} if !exists $data->{'resources'}{'r
r configuration. It looks for the C<resources/repository/web> setting in C<META.json>:
=over 4
=item *
If C<META.json> doesn't exist in the dist root, C<user> and C<repo> are required.
=item *
If
unless $asset->name =~ /\.vue$/;
$asset->format('js');
my $attrs = $asset->TO_JSON;
$attrs->{key} = 'js-vue-template';
$attrs->{minified} = 1;
#~ $attrs->{na
ole.error(errs);
///delete c.ast;
///delete c.errors;
//console.log(c);
//process.stdout.write(JSON.stringify(c));
///process.stdout.write(c.render);
/***
https://github.com/vuejs/component-comp
ller config into a .cpanfile file
our $VERSION = '0.1411';
use Dist::Iller::Elk;
use JSON::MaybeXS qw/decode_json/;
use Path::Tiny;
use Carp qw/croak/;
use Dist::Iller::Prereq;
with qw/
Dist::Ill
elf = shift;
my $metapath = path('META.json');
if(!$metapath->exists) {
croak 'META.json does not exist';
}
my $meta = decode_json($metapath->slurp)->{'prereqs'};
for my
package Forks::Queue::File;
use strict;
use warnings;
use Carp;
use JSON;
use Time::HiRes;
use base 'Forks::Queue';
use 5.010; # sorry, v5.08. I love the // //= operators too much
our $VERSION =
;
# prefer functional JSON calls because we still want to use JSON
# during global destruction, and a JSON object might not be available
# then
sub jsonize {
JSON::to_json($_[0], { allow_nonref=
>1, ascii=>1 } );
}
sub dejsonize {
JSON::from_json($_[0], { allow_nonref => 1, ascii => 1 } );
}
# if we exercise firm control over line endings,
# we won't have any DOS vs Unix vs Mac fights.
nore
always:
- /.build
- /_build*
- /Build
- MYMETA.*
- '!META.json'
- /.prove
---
# No configuration for .cpanfile, but by having a YAML document for
> (one of 'insert', 'update' or 'delete')
to more exotic and complex items like C<column_changes_json>. B<source> datapoints are
logically the same as B<change>, but like B<base> datapoints, only ne
d1 DESCRIPTION
This distributions is set of basic conversions from/to Toolforge Mix'n'match tool JSON structures.
(https://mix-n-match.toolforge.org/).
=head1 SEE ALSO
=over
=item L<Toolforge::Mix
sion is between object defined in Toolforge::MixNMatch::Object::User and structure
serialized via JSON to Mix'n'match application.
=head1 SUBROUTINES
=head2 C<obj2struct>
my $struct_hr = obj2struc
{ data_type => "varchar", is_nullable => 0, size => 16 }
},
{
name => 'column_changes_json',
column_info => { data_type => "mediumtext", is_nullable => 1 }
},
{
name => 'col
> (one of 'insert', 'update' or 'delete')
to more exotic and complex items like C<column_changes_json>. B<source> datapoints are
logically the same as B<change>, but like B<base> datapoints, only ne
n is between object defined in Toolforge::MixNMatch::Object::Catalog and structure
serialized via JSON to Mix'n'match application.
=head1 SUBROUTINES
=head2 C<obj2struct>
my $struct_hr = obj2struc
'column_changes_json', is => 'ro', isa => Str, lazy => 1, default => sub {
my $self = shift;
my $table = $self->column_changes_arr_arr_table;
require JSON;
return JSON::encode_json($table);
};
h
is between object defined in Toolforge::MixNMatch::Object::YearMonth and structure
serialized via JSON to Mix'n'match application.
=head1 SUBROUTINES
=head2 C<obj2struct>
my $struct_hr = obj2struc
'Data::Dump::JavaScript::_Bool';
# Blessed reference with TO_JSON method
if (blessed $value && (my $sub = $value->can('TO_JSON'))) {
return _encode_value($value->$sub);
}
}
# N
, 2], bar => 'hello!', baz => true });
=head1 DESCRIPTION
Data::Dump::JavaScript is a fork of L<JSON::Tiny> version 0.55 which outputs
pretty-printed JavaScript.
The indention is according to L<Jav
##-- for shared template data
use Cwd qw(getcwd abs_path);
#use LWP::UserAgent;
use Template;
use JSON qw();
use Time::HiRes qw();
use utf8;
use Carp;
use strict;
BEGIN {
#binmode(STDIN, ':utf8');
ig loading (optional)
## $dbcgi = $dbcgi->load_config($filename)
## + clobers %$dbcgi keys from JSON filename
sub load_config {
my ($dbcgi,$file) = @_;
open(RC,"<:raw",$file)
or $dbcgi->logc
nfig(): close failed for '$file': $!");
my $data = JSON::from_json($buf,{utf8=>1,relaxed=>1})
or $dbcgi->logconfess("load_config(): from_json() failed for config data from '$file': $!");
@$dbc