view release on metacpan or search on metacpan
lib/App/I18N.pm view on Meta::CPAN
use File::Find::Rule;
use File::Path qw/mkpath/;
use Locale::Maketext::Extract;
use Getopt::Long;
use Exporter 'import';
use JSON::XS;
use YAML::XS;
use File::Basename;
use Locale::Maketext::Extract;
use App::I18N::Logger;
use Cwd;
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.014"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.19",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.017"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"x_authority" : "cpan:PERLANCAR",
"x_contributors" : [
"Steven Haryanto <stevenharyanto@gmail.com>"
],
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.008"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0217"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.014"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.19",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.017"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.010"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0239",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"subroutines" : "0.001"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.012"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.30.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.12",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"x_authority" : "cpan:PERLANCAR",
"x_contributors" : [
"perlancar (@pc-office) <perlancar@gmail.com>"
],
"x_generated_by_perl" : "v5.30.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.19",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.032"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.40.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.38",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
"web" : "https://github.com/jeteve/App-JESP"
}
},
"version" : "0.016",
"x_generated_by_perl" : "v5.32.1",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "GPL-3.0-only"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"Test::Kwalitee" : "1.21"
}
},
"runtime" : {
"recommends" : {
"Cpanel::JSON::XS" : "3.0115"
},
"requires" : {
"Data::Dumper" : "2.154",
"JSON::MaybeXS" : "1.003003",
"YAML::Tiny" : "1.62",
view all matches for this distribution
view release on metacpan or search on metacpan
"web" : "https://github.com/ingydotnet/app-jyj-pm"
}
},
"version" : "0.0.2",
"x_generated_by_perl" : "v5.28.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.06",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/JsonLogUtils.pm view on Meta::CPAN
use strict;
use warnings;
use Fcntl qw(:seek);
use Iterator::Simple qw(iterator iter igrep imap ichain);
use JSON::XS qw(decode_json encode_json);
use Time::HiRes qw(sleep);
use Term::SimpleColor;
use parent 'Exporter';
view all matches for this distribution
view release on metacpan or search on metacpan
"url" : "https://github.com/battlemidget/jup.git",
"web" : "https://github.com/battlemidget/jup"
}
},
"version" : "1.01",
"x_serialization_backend" : "JSON::XS version 3.02"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.028"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/KGB/Client/ServerRef.pm view on Meta::CPAN
}
sub send_changes_json {
my ( $self, $repo_id, $message ) = @_;
require JSON::XS;
require JSON::RPC::Client::Any;
my $rpc = JSON::RPC::Client::Any->new();
$rpc->ua->timeout($self->timeout // 15);
$message->{id} = 1;
$message->{version} = '1.1';
my $json = eval { JSON::XS::encode_json($message); };
unless ($json) {
my $dump;
if ( require Devel::PartialDump ) {
$dump = Devel::PartialDump->new->dump($message);
}
view all matches for this distribution
view release on metacpan or search on metacpan
},
"version" : "6.030"
}
},
"x_generated_by_perl" : "v5.36.1",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "6.031"
}
},
"x_authority" : "cpan:PERLANCAR",
"x_generated_by_perl" : "v5.38.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.37",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
view all matches for this distribution
view release on metacpan or search on metacpan
use Error::Pure qw(err);
use File::Spec::Functions qw(catfile);
use Getopt::Std;
use HTTP::Request;
use IO::Barf qw(barf);
use JSON::XS;
use LWP::UserAgent;
use METS::Files;
use Perl6::Slurp qw(slurp);
our $VERSION = 0.04;
'Content-Type', $res->headers->content_type;
}
# Get perl structure.
my $json_ar = eval {
JSON::XS->new->decode($json);
};
if ($EVAL_ERROR) {
err "Cannot parse JSON on '$json_uri' URI.",
'JSON decode error', $EVAL_ERROR;
}
L<English>,
L<Error::Pure>,
L<Getopt::Std>,
L<HTTP::Request>,
L<IO::Barf>,
L<JSON::XS>,
L<LWP::UserAgent>,
L<METS::Files>,
L<Perl6::Slurp>.
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
use Class::Utils qw(set_params);
use Data::Kramerius;
use Error::Pure qw(err);
use Getopt::Std;
use IO::Barf qw(barf);
use JSON::XS;
use LWP::UserAgent;
our $VERSION = 0.02;
# Constructor.
L<Class::Utils>,
L<Data::Kramerius>,
L<Error::Pure>,
L<Getopt::Std>,
L<IO::Barf>,
L<JSON::XS>,
L<LWP::UserAgent>.
=head1 SEE ALSO
=over
view all matches for this distribution
view release on metacpan or search on metacpan
kritika.fatpack view on Meta::CPAN
$fatpacked{"File/Which.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_WHICH';
package File::Which;use strict;use warnings;use Exporter ();use File::Spec ();our$VERSION='0.05';our@ISA='Exporter';our@EXPORT='which';our@EXPORT_OK='where';use constant IS_VMS=>($^O eq 'VMS');use constant IS_MAC=>($^O eq 'MacOS');use constant IS_D...
FILE_WHICH
$fatpacked{"JSON.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'JSON';
package JSON;use strict;use Carp ();use Exporter;BEGIN {@JSON::ISA='Exporter'}@JSON::EXPORT=qw(from_json to_json jsonToObj objToJson encode_json decode_json);BEGIN {$JSON::VERSION='0.05';$JSON::DEBUG=0 unless (defined$JSON::DEBUG);$JSON::DEBUG=$ENV...
require B;
local $^W;
no strict 'refs';
*{"${JSON::Backend}\::encode"} = sub {
# only works with Perl 5.18+
kritika.fatpack view on Meta::CPAN
: undef
;
};
$org_encode->(@_);
};
| if (!$_UNIV_CONV_BLESSED++);next}push@what_to_export,$tag}return if ($no_export);__PACKAGE__->export_to_level(1,$pkg,@what_to_export)}sub jsonToObj {my$alternative='from_json';if (defined $_[0]and UNIVERSAL::isa($_[0],'JSON')){shift @...
use $module $required_version ();
|;if ($@){if (defined$opt and $opt & $_INSTALL_DONT_DIE){$JSON::DEBUG and Carp::carp "Can't load $module...($@)";return 0}Carp::croak $@}$JSON::BackendModuleXS=$module;return 1}sub _load_xs {my ($module,$opt)=@_;__load_xs($module,$opt)or return...
#
# Helper classes for Backend Module (XS)
kritika.fatpack view on Meta::CPAN
2.97001
=head1 DESCRIPTION
This module is a thin wrapper for L<JSON::XS>-compatible modules with a few
additional features. All the backend modules convert a Perl data structure
to a JSON text as of RFC4627 (which we know is obsolete but we still stick
to; see below for an option to support part of RFC7159) and vice versa.
This module uses L<JSON::XS> by default, and when JSON::XS is not available,
this module falls back on L<JSON::PP>, which is in the Perl core since 5.14.
If JSON::PP is not available either, this module then falls back on
JSON::backportPP (which is actually JSON::PP in a different .pm file)
bundled in the same distribution as this module. You can also explicitly
specify to use L<Cpanel::JSON::XS>, a fork of JSON::XS by Reini Urban.
All these backend modules have slight incompatibilities between them,
including extra features that other modules don't support, but as long as you
use only common features (most important ones are described below), migration
from backend to backend should be reasonably easy. For details, see each
kritika.fatpack view on Meta::CPAN
=head1 CHOOSING BACKEND
This module respects an environmental variable called C<PERL_JSON_BACKEND>
when it decides a backend module to use. If this environmental variable is
not set, it tries to load JSON::XS, and if JSON::XS is not available, it
falls back on JSON::PP, and then JSON::backportPP if JSON::PP is not available
either.
If you always don't want it to fall back on pure perl modules, set the
variable like this (C<export> may be C<setenv>, C<set> and the likes,
depending on your environment):
> export PERL_JSON_BACKEND=JSON::XS
If you prefer Cpanel::JSON::XS to JSON::XS, then:
> export PERL_JSON_BACKEND=Cpanel::JSON::XS,JSON::XS,JSON::PP
You may also want to set this variable at the top of your test files, in order
not to be bothered with incompatibilities between backends (you need to wrap
this in C<BEGIN>, and set before actually C<use>-ing JSON module, as it decides
its backend as soon as it's loaded):
kritika.fatpack view on Meta::CPAN
=over
=item -support_by_pp
BEGIN { $ENV{PERL_JSON_BACKEND} = 'JSON::XS' }
use JSON -support_by_pp;
my $json = JSON->new;
# escape_slash is for JSON::PP only.
$json->allow_nonref->escape_slash->encode("/");
With this option, this module loads its pure perl backend along with
its XS backend (if available), and lets the XS backend to watch if you set
a flag only JSON::PP supports. When you do, the internal JSON::XS object
is replaced with a newly created JSON::PP object with the setting copied
from the XS object, so that you can use JSON::PP flags (and its slower
C<decode>/C<encode> methods) from then on. In other words, this is not
something that allows you to hook JSON::XS to change its behavior while
keeping its speed. JSON::XS and JSON::PP objects are quite different
(JSON::XS object is a blessed scalar reference, while JSON::PP object is
a blessed hash reference), and can't share their internals.
To avoid needless overhead (by copying settings), you are advised not
to use this option and just to use JSON::PP explicitly when you need
JSON::PP features.
kritika.fatpack view on Meta::CPAN
my $json = JSON->new->allow_nonref->convert_blessed;
my $object = bless {foo => 'bar'}, 'Foo';
$json->encode($object); # => {"foo":"bar"}
JSON::XS-compatible backend modules don't encode blessed objects by
default (except for their boolean values, which are typically blessed
JSON::PP::Boolean objects). If you need to encode a data structure
that may contain objects, you usually need to look into the structure
and replace objects with alternative non-blessed values, or enable
C<convert_blessed> and provide a C<TO_JSON> method for each object's
kritika.fatpack view on Meta::CPAN
=back
=head1 FUNCTIONAL INTERFACE
This section is taken from JSON::XS. C<encode_json> and C<decode_json>
are exported by default.
This module also exports C<to_json> and C<from_json> for backward
compatibility. These are slower, and may expect/generate different stuff
from what C<encode_json> and C<decode_json> do, depending on their
kritika.fatpack view on Meta::CPAN
See L<MAPPING>, below, for more information on how JSON values are mapped to
Perl.
=head1 COMMON OBJECT-ORIENTED INTERFACE
This section is also taken from JSON::XS.
The object oriented interface lets you configure your own encoding or
decoding style, within the limits of supported formats.
=head2 new
$json = JSON->new
Creates a new JSON::XS-compatible backend object that can be used to de/encode JSON
strings. All boolean flags described below are by default I<disabled>.
The mutators for flags all return the backend object again and thus calls can
be chained:
kritika.fatpack view on Meta::CPAN
=head2 backend
$backend = $json->backend
Since 2.92, C<backend> method returns an abstract backend module used currently,
which should be JSON::Backend::XS (which inherits JSON::XS or Cpanel::JSON::XS),
or JSON::Backend::PP (which inherits JSON::PP), not to monkey-patch the actual
backend module globally.
If you need to know what is used actually, use C<isa>, instead of string comparison.
=head2 is_xs
$boolean = $json->is_xs
Returns true if the backend inherits JSON::XS or Cpanel::JSON::XS.
=head2 is_pp
$boolean = $json->is_pp
kritika.fatpack view on Meta::CPAN
You can use this to get/set a value of a particular flag.
=head1 INCREMENTAL PARSING
This section is also taken from JSON::XS.
In some cases, there is the need for incremental parsing of JSON
texts. While this module always has to keep both JSON text and resulting
Perl data structure in memory at one time, it does allow you to parse a
JSON stream incrementally. It does so by accumulating text until it has
kritika.fatpack view on Meta::CPAN
ignore any trailing data, which means you have to reset the parser after
each successful decode.
=head1 MAPPING
Most of this section is also taken from JSON::XS.
This section describes how the backend modules map Perl values to JSON values and
vice versa. These mappings are designed to "do the right thing" in most
circumstances automatically, preserving round-tripping characteristics
(what you put in comes out as something equivalent).
kritika.fatpack view on Meta::CPAN
These special values become JSON true and JSON false values,
respectively. You can also use C<\1> and C<\0> directly if you want.
=item blessed objects
Blessed objects are not directly representable in JSON, but C<JSON::XS>
allows various ways of handling objects. See L<OBJECT SERIALISATION>,
below, for details.
=item simple scalars
kritika.fatpack view on Meta::CPAN
=back
=head1 ENCODING/CODESET FLAG NOTES
This section is taken from JSON::XS.
The interested reader might have seen a number of flags that signify
encodings or codesets - C<utf8>, C<latin1> and C<ascii>. There seems to be
some confusion on what these do, so here is a short comparison:
kritika.fatpack view on Meta::CPAN
and boolean behaviors to the author of the backend module you
are using.
=head1 SEE ALSO
L<JSON::XS>, L<Cpanel::JSON::XS>, L<JSON::PP> for backends.
L<JSON::MaybeXS>, an alternative that prefers Cpanel::JSON::XS.
C<RFC4627>(L<http://www.ietf.org/rfc/rfc4627.txt>)
=head1 AUTHOR
Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>
JSON::XS was written by Marc Lehmann <schmorp[at]schmorp.de>
The release of this new version owes to the courtesy of Marc Lehmann.
=head1 COPYRIGHT AND LICENSE
view all matches for this distribution