Group
Extension

Matches 6

Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia/View/JSON.pm ( view source; MetaCPAN )
package Ambrosia::View::JSON;
use strict;
use warnings;
use Carp;

use JSON::XS ();

use Ambrosia::Meta;

class sealed
{
    extends => [qw/Ambrosia::View/],
};

our $VERSION = 0.010;

sub process
{
 
 return $self->as_json;
}

sub as_json
{
    my $self = shift;

    my $json = JSON::XS->new;
    $json->utf8(0);
    $json->latin1(1);

    my $str = '';
    eval
    {
        $json->convert_blessed
elf->data ? $json->encode($self->data) : '{}';
warn "$str\n";
    };
    if ( $@ )
    {
        carp "ERROR: $@";
    }

    return $str;
}

1;

__END__

=head1 NAME

Ambrosia::View::JSON - it is VIE
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia/View/XSLT.pm ( view source; MetaCPAN )
e);
}


1;

__END__

=head1 NAME

Ambrosia::View::JSON - it is VIEW in MVC.

=head1 VERSION

version 0.010

=head1 DESCRIPTION

C<Ambrosia::View::JSON> - it is VIEW in MVC.
Returns result in XML or HT
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia/Context.pm ( view source; MetaCPAN )
scriptName//;

    my ($response_type, $resource_type, $resource_id) = ( $uri =~ m{/?(?:(html|xml|json|atom|rss)/)?([^?\\\/]*)(?:/([^?\\\/]+)?)?} );

    $self->response_type = lc($response_type) || '
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/share/Managers/buildApp.pm ( view source; MetaCPAN )
EntityCode($hDir{dirTemplates}, $tmplPath . '/Templates/Templates/' . $tpl_path . '/edit_json.xsl', '_edit_json' . $ex, 1, '@Type!="BIND" and @Type!="VIEW"');
    copy($tmplPath . '/Templates/Template
y $style_doc = $self->parser->parse_file($tmplPath . '/Templates/Templates/' . $tpl_path . '/list_json.xsl');
        ($style_doc->getElementsByLocalName('output'))[0]->setAttribute( encoding => $enco
y $results = $stylesheet->transform($self->source);
        my $fn = $hDir{dirTemplates} . '/list_json.xsl';
        if ( -e $fn )
        {
            rename $fn, $fn . '.bak';
        }
        #if
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia/core/Nil.pm ( view source; MetaCPAN )
[], ref $proto || $proto;
    }
}

sub sub_nil
{
    my $obj = shift;
    sub { $obj };
}

sub TO_JSON
{
    return {};
}

sub AUTOLOAD
{
    unless ( defined wantarray ) # don't bother doing more
   
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia.pm ( view source; MetaCPAN )
View>

The base class, which creates a view of the application.
The result can be represented in  JSON, XML and HTML.
L<XML::LibXSLT> is used to generate HTML.

=item L<Ambrosia::Validator>

The class

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