NAME
App::PipeFilter::JsonMap - map input fields to output fields by renaming them
VERSION
version 0.005
SYNOPSIS
#!/usr/bin/perl
use App::PipeFilter::JsonMap;
exit App::PipeFilter::JsonMap->new_with_options()->run();
DESCRIPTION
App::PipeFilter::JsonMap implements the jmap(1) pipeline filter. It renames JSON object fields by mapping input field names to new ones on output.
This class subclasses App::PipeFilter::Generic::Json.
PUBLIC ATTRIBUTES
i
The i() attribute holds an arrayref of one or more input fields to be renamed. All other input fields will be present in the resulting output without being renamed. MooseX::Getopt sets i() to the values of the -i options from the command line.
o
The o() attribute holds an arrayref of the new names of the fields from i(). Both i() and o() must have the same number of field names. MooseX::Getopt sets o() to the values of the -o options from the command line.
PUBLIC METHODS
transform
The transform() method renames the fields named in the i() attribute to the names found in the o() attribute.
SEE ALSO
You may read this module's implementation in its entirety at
perldoc -m App::PipeFilter::JsonMap
App::PipeFilter has top-level documentation including a table of contents for all the libraries and utilities included in the project.
BUGS
https://rt.cpan.org/Public/Dist/Display.html?Name=App-PipeFilter
REPOSITORY
https://github.com/rcaputo/app-pipefilter
COPYRIGHT AND LICENSE
App::PipeFilter::JsonMap is Copyright 2011 by Rocco Caputo. All rights are reserved. App::PipeFilter::JsonMap is released under the same terms as Perl itself.