$self;
}
sub render
{
my ( $self, $data ) = @_;
if ($self->{'format'} eq 'JSON') {
TRACE ( "Rendering to JSON" );
DUMP ( $data );
return Data::JavaScript::Anon->anon_dump ( $data )
late
{
return 0;
}
sub available_formats
{
return [ "JavaScript::Anon", "Javascript::Anon", "JSON" ];
}
sub TRACE {}
sub DUMP {}
1;
=head1 NAME
Any::Renderer::JavaScript::Anon - renders anony
JSON
Use the format 'JSON' to return completely anonymous data structures - i.e. with no leading
"var script_output = " and no trailing ";"
perl -MAny::Renderer -e "print Any::Renderer->new('JSON