package Mojo::File::Role::JSON;
# # ABSTRACT: adds a json method to Mojo::File to store and retrieve JSON
# use Mojo::Base -role;
# use Mojo::Util qw/dumper/;
# use JSON::MaybeXS;
# use Hash::Merg
sub json {
# my $self = shift;
# if (@_) {
# unless (-f $self) { $self->dirname->make_path }
# my $json = JSON::MaybeXS->new->pretty($pretty)->utf8->encode(shift());
# $self->spew($json);
#
if (want('OBJECT')) {
# rreturn $self;
# } else {
# rreturn $self->json;
# }
# }
# return undef unless -f $self;
# # if ($self->policy eq "die") {
# # die sprintf qq(Fi