:JSON;
use strict;
use warnings;
use Algorithm::Diff qw(diff);
use Cpanel::JSON::XS qw(encode_json);
use Sub::Exporter -setup => { exports => [ 'json_diff' ] };
our $VERSION = '1.000';
sub json_
}
return encode_json([
map { defined($changes[$_]) ? { element => $_, %{$changes[$_]} } : () }
0 .. $#changes
]);
}
=head1 NAME
Algorithm::Diff::JSON - find the difference
s between two lists and report on them in JSON
=head1 SYNOPSIS
This perl code:
use Algorithm::Diff::JSON qw(json_diff);
my $json = json_diff(
[0, 1, 2, 3, 4, 5, 6],