Group
Extension

Matches 4

Grimlock ( D/DH/DHOSS/Grimlock-0.11.tar.gz, DHOSS, 2012; MetaCPAN )
Grimlock/lib/Grimlock/Web/View/JSON.pm ( view source; MetaCPAN )
ge Grimlock::Web::View::JSON;
{
  $Grimlock::Web::View::JSON::VERSION = '0.11';
}

use strict;
use base 'Catalyst::View::JSON';
use JSON::XS ();
use Try::Tiny;

sub encode_json {
    my($self, $c, $da
ta) = @_;
    my $encoder = JSON::XS->new->ascii->allow_nonref->convert_blessed->allow_blessed;
    $encoder->pretty if $c->debug;
    my $d = $encoder->encode($data);
    return $d;
}
 
sub process {
lf->encode_json($c, $data); 
    return $serialized;
}


=head1 NAME

Grimlock::Web::View::JSON - Catalyst JSON View

=head1 SYNOPSIS

See L<Grimlock::Web>

=head1 DESCRIPTION

Catalyst JSON View.

=h
Grimlock ( D/DH/DHOSS/Grimlock-0.11.tar.gz, DHOSS, 2012; MetaCPAN )
Grimlock/lib/Grimlock/Web/Controller/API.pm ( view source; MetaCPAN )
    'text/html'                         => [ 'View', 'HTML' ],
    'application/json'                  => [ 'View', 'JSON' ],
    'text/x-data-dumper'                => [ 'Data::Serializer', 'Data::Du
Grimlock ( D/DH/DHOSS/Grimlock-0.11.tar.gz, DHOSS, 2012; MetaCPAN )
Grimlock/lib/Grimlock/Schema/Result/User.pm ( view source; MetaCPAN )
::Candy -components => [
  qw(
      InflateColumn::DateTime
      TimeStamp
      Helper::Row::ToJSON
      EncodedColumn
      )
];
use Data::Dumper;
use Text::Password::Pronounceable;

resultset_cl
    }
  );
}

sub TO_JSON {
  my $self = shift;
  return {
    created_at => $self->created_at . "",
    updated_at => $self->updated_at . "",
    entries => $self->entries_TO_JSON,
    %{ $self->next
::method },
  };
}

sub entries_TO_JSON {
  my $self = shift;
  my $entry_rs = $self->entries;
  my @entry_collection;
  push @entry_collection, {
    entryid => $_->entryid,
    title   => $_->title,
Grimlock ( D/DH/DHOSS/Grimlock-0.11.tar.gz, DHOSS, 2012; MetaCPAN )
Grimlock/lib/Grimlock/Schema/Result/Entry.pm ( view source; MetaCPAN )
0.11';
}

use Grimlock::Schema::Candy -components => [
  qw(
      TimeStamp
      Helper::Row::ToJSON
      +DBICx::MaterializedPath
      )
];

use HTML::Scrubber;

resultset_class 'Grimlock::Schema
ne->name;
  return $date_time;
}


sub TO_JSON {
  my $self = shift;
  return {
    reply_count => $self->reply_count,
    children => $self->children_TO_JSON,
    parent   => $self->parent,
    body 
    => $self->body,
    %{ $self->next::method },
  }
}

sub children_TO_JSON {
  my $self = shift;
  my $children_rs = $self->children;
  my @child_collection;
  push @child_collection, {
    entryid

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