);
}
##
## toJson() and fromJson() are DUMP and SLURP equivalents for JSON.
## I'm not sure if they're all that useful yet so they're silently
## lurking here for now.
##
#sub toJson
#{
#my $self =
# croak("Cannot use toJson(): module JSON::XS not found.\n")
# unless (eval 'require JSON::XS; 1');
#
# my $ref = refaddr($self);
# my $json = JSON::XS->new();
# return $json->encode($STORAGE{$ref}
ess $str;
#
# croak("Cannot use fromJson(): module JSON::XS not found.\n")
# unless (eval 'require JSON::XS; 1');
#
# my $json = JSON::XS->new();
# my $obj = $json->decode($str);
# my $ref = refaddr