package App::Codeowners::Formatter::JSON;
# ABSTRACT: Format codeowners output as JSON
use warnings;
use strict;
our $VERSION = '0.51'; # VERSION
use parent 'App::Codeowners::Formatter';
use App:
eval { require JSON::MaybeXS } or die "Missing dependency: JSON::MaybeXS\n";
my %options;
$options{pretty} = 1 if lc($self->format) eq 'pretty';
my $json = JSON::MaybeXS->new(canon
print { $self->handle } $json->encode($results);
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
App::Codeowners::Formatter::JSON - Format codeowners output as JSON
=head1 VERSION
version 0.
}
}
}
return [sort @options];
}
sub _completion_formats { [qw(csv json json:pretty tsv yaml)] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
App::Codeowners::Options
ters {
return qw(
App::Codeowners::Formatter::CSV
App::Codeowners::Formatter::JSON
App::Codeowners::Formatter::String
App::Codeowners::Formatter::TSV
App::C
ter::CSV>
=item *
L<App::Codeowners::Formatter::String>
=item *
L<App::Codeowners::Formatter::JSON>
=item *
L<App::Codeowners::Formatter::TSV>
=item *
L<App::Codeowners::Formatter::Table>
=it