Group
Extension

Matches 1

JavaScript-Dumper ( P/PE/PERLER/JavaScript-Dumper-0.011.tar.gz, PERLER, 2009; MetaCPAN )
JavaScript-Dumper/lib/JavaScript/Dumper.pm ( view source; MetaCPAN )
Exporter;
use base "JSON::PP";
use overload;

use Carp ();
use B ();

use Class::C3;

$JavaScript::Dumper::VERSION = '0.011';

@JavaScript::Dumper::EXPORT = qw(js_dumper);

my $JSON; # cache

sub js_d
umper ($) { # encode
    ($JSON ||= __PACKAGE__->new)->encode(@_);
}

sub value_to_json {
	my ($self, $value) = @_;
	my $type = ref($value);
	if (!defined $value) {
		return "null";
	} elsif($type eq 
lean" => true, "call": function}]"; 

=head1 DESCRIPTION

This module uses L<JSON::PP> as base and overrides C<value_to_json> to accept SCALAR-refs to be returned without quotes.

=head1 FUNCTIONS

=o

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.