package File::JSON::Slurper;
$File::JSON::Slurper::VERSION = '1.00';
use 5.006;
use strict;
use warnings;
use parent 'Exporter';
use JSON::MaybeXS qw/ encode_json decode_json /;
use File::Slurper qw/
= qw/ read_json write_json /;
sub read_json
{
my $json = read_binary(@_);
return decode_json($json);
}
sub write_json
{
my ($filename, $ref) = @_;
my $json = encode_json($ref);
$json);
}
1;
=head1 NAME
File::JSON::Slurper - slurp a JSON file into a data structure, and the reverse
=head1 SYNOPSIS
use File::JSON::Slurper qw/ read_json write_json /;
my $ref = read_json(