::Deep::JSON;
use strict;
use warnings;
use 5.008_001;
use Test::Deep ();
use Test::Deep::Cmp;
use JSON::MaybeXS;
use Exporter::Lite;
our $VERSION = '0.05';
our @EXPORT = qw(json);
sub json ($) {
lf->{val} = $expected;
}
sub descend {
my ($self, $got) = @_;
my $parsed = eval { decode_json($got) };
if ($@) {
$self->{error} = $@;
return 0;
}
return Test::Deep
ostics(@_);
}
1;
__END__
=head1 NAME
Test::Deep::JSON - Compare JSON with Test::Deep
=head1 SYNOPSIS
use Test::Deep;
use Test::Deep::JSON;
cmp_deeply {
foo => 'bar',
payload =