ocal $Text::Wrap::huge = 'overflow';
our %outputformats = (
anvl => 'ANVL',
csv => 'CSV',
json => 'JSON',
plain => 'Plain',
psv => 'PSV',
turtle => 'Turtle',
xml => 'XML',
);
sub listformats
rall starting indent
indent_step => # how much to increment/decrement indent
' ', # for XML, JSON
outhandle => '', # return string by default
turtle_indent => # turtle has one indent width
'
/"/; # trim both ends and double-quote
return $s;
}
package File::OM::JSON;
our @ISA = ('File::OM');
sub elem { # OM::JSON
my $self = shift;
my ($name, $value, $lineno, $elemnum) = (shift, shif
mber of values for keys (eg,
# for turtle, $$o{subject}). $recnum is useful for
# outputting json separators (eg, no comma if $recnum eq 1)
# or record numbers in comments (eg, if $$o{verbose})
Specific conversions, based on an "output multiplexer"
L<File::OM>, are possible to XML, Turtle, JSON, CSV, and PSV (Pipe
Separated Value), and Plain unlabeled text.
The B<OM> package can also be us
ively. Array
element 1 always contains a string naming the format of the input, such
as, "ANVL", "JSON", "XML", etc.
The remaining triples are free form except that the values will have been
drawn fr
ord, which
can be represented in a variety of underlying syntaxes, such as ANVL,
Turtle, XML, and JSON. The ERC elements include Dublin Core Kernel
metadata.
=head1 SEE ALSO
A Metadata Kernel for E