use Object::Remote::Future;
use System::Introspector::Gatherer;
+use JSON::Diffable qw( encode_json );
+
has config => (is => 'ro', required => 1);
has introspectors => (is => 'lazy');
sub _store {
my ($self, $data) = @_;
- my $yaml = Data::YAML::Writer->new;
my $storage = $self->storage;
my @files;
for my $class (sort keys %$data) {
- my $file = sprintf '%s.yml', join '/',
+ my $file = sprintf '%s.json', join '/',
node => $self->node_path,
map lc, map {
s{([a-z0-9])([A-Z])}{${1}_${2}}g;
} split m{::}, $class;
my $fh = $storage->open('>:utf8', $file, mkpath => 1);
print "Writing $file\n";
- $yaml->write($data->{$class}, $fh);
+ print $fh encode_json($data->{$class});
push @files, $storage->file($file);
}
$self->_cleanup(\@files);