XML;
use Encode qw(encode);
use YAML qw(Dump);
use JSON qw();
use File::Path qw(mkpath);
__PACKAGE__->mk_accessors(qw(to_xml to_hash to_yaml to_json from_xml));
our $VERSION = '1.0.0';
# Default va
my $hash = $self->to_hash(%args);
return YAML::Dump($hash);
}
=head2 to_json( ... )
Export the Augeas tree to JSON.
=over
=item path
C<path> is the Augeas path to export. If ommitted, it wi
from the export.
=back
=cut
sub to_json {
my $self = shift;
my %args = @_;
my $hash = $self->to_hash(%args);
my $json = new JSON;
return $json->encode($hash);
}
=head2 from_xml(