Group
Extension

Matches 1

DBIx-Wrapper ( D/DO/DOWENS/DBIx-Wrapper-0.29.tar.gz, DOWENS, 2012; MetaCPAN )
DBIx-Wrapper/lib/DBIx/Wrapper.pm ( view source; MetaCPAN )
pod

=head3 C<to_json($data)>

Returns the JSON representation of C<$data> (arbitrary
datastructure -- but not objects).  See http://www.json.org/ or
http://en.wikipedia.org/wiki/JSON for details.  In
 to_json {
    my $self = shift;
    my $data = shift;

    return 'null' unless defined $data;
    
    my $type = reftype($data);
    unless (defined($type)) {
        return $self->_escape_json_str
n(',', map { $self->to_json($_) } @$data) . ']';
    }
    elsif ($type eq 'HASH') {
        my @keys = sort keys %$data;
        return '{' . join(',', map { $self->_escape_json_str($_) . ':'
       

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