package Error::Pure::Output::JSON;
use base qw(Exporter);
use strict;
use warnings;
use JSON;
use Readonly;
# Constants.
Readonly::Array our @EXPORT_OK => qw(err_json);
# Global variables.
our $PR
11;
# JSON print of backtrace.
sub err_json {
my @errors = @_;
my $ret_json;
my $json = JSON->new;
if ($PRETTY) {
$ret_json = $json->pretty->encode(@errors);
} else {
$ret_json = $json->enco
n $ret_json;
}
1;
__END__
=pod
=encoding utf8
=head1 NAME
Error::Pure::Output::JSON - Output JSON subroutines for Error::Pure.
=head1 SYNOPSIS
use Error::Pure::Output::JSON qw(err_json);
pri