able qw( postderef );
use true;
package JSON::LD 0.02 {
# ABSTRACT: Load and dump JSON files
use Exporter qw( import );
use Path::Tiny ();
use JSON::MaybeXS ();
our @EXPORT = qw( LoadFi
{
return JSON::MaybeXS::decode_json(Path::Tiny->new($filename)->slurp_raw);
}
sub DumpFile ($filename, $data) {
Path::Tiny->new($filename)->spew_raw(JSON::MaybeXS::encode_json($data));
F-8
=head1 NAME
JSON::LD - Load and dump JSON files
=head1 VERSION
version 0.02
=head1 SYNOPSIS
use JSON::LD;
DumpFile("foo.json", { a => 1 });
my $data - LoadFile("foo.json:");
=head1 DESC