MozRepl::Plugin::JSON - To JSON string plugin.


MozRepl documentation  | view source Contained in the MozRepl distribution.

Index


NAME

Top

MozRepl::Plugin::JSON - To JSON string plugin.

VERSION

Top

version 0.04

SYNOPSYS

Top

    use MozRepl;
    use MozRepl::Util;

    my $repl = MozRepl->new;
    $repl->setup({ plugins => { plugins => [qw/JSON/] } });
    print $repl->json({ source => MozRepl::Util->javascript_value({foo => 1, bar => 2}) });

DESCRIPTION

Top

Add json() method to MozRepl.

METHODS

Top

setup($ctx, $args)

Load script at http://www.thomasfrank.se/downloadableJS/jsonStringify.js

execute($ctx, $args)

$ctx

Context object. See MozRepl.

$args

Hash reference.

source

Source string. If you want to JavaScript literal, then use MozRepl::Util->javascript_value() method. See javascript_value($value) in MozRepl::Util.

SEE ALSO

Top

MozRepl::Plugin::Base
MozRepl::Util
Data::JavaScript::Anon
JavaScript::Minifier
http://www.thomasfrank.se/downloadableJS/jsonStringify.js

AUTHOR

Top

Toru Yamaguchi, <zigorou@cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-mozrepl-plugin-json@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Top


MozRepl documentation  | view source Contained in the MozRepl distribution.