use strict;
use warnings FATAL => 'all';
use utf8;
use open qw(:std :utf8);
use Test::More;
use JSON::PP;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(
test_format
);
our @EXPORT
at ne 'pretty_json';
die "'format_sub' must be sub" if defined($format_sub) && ref($format_sub) ne 'CODE';
my $sub = defined($format) && $format eq 'pretty_json' ? \&_pretty_json : $format_su
}
sub _pretty_json {
my ($content) = @_;
my $json_coder = JSON::PP
->new
->pretty
->canonical
->indent_length(4)
;
my $data = JSON::PP->new->deco