package Spica::Parser::JSON;
use strict;
use warnings;
use Mouse;
extends 'Spica::Parser';
has parser => (
is => 'ro',
isa => 'JSON',
lazy_build => 1,
);
override parse
=> sub {
my ($self, $body) = @_;
return $self->parser->decode($body);
};
no Mouse;
use JSON;
sub _build_parser {
my $self = shift;
return JSON->new->utf8;
}
1;
',
isa => ParserClass,
coerce => 1,
lazy => 1,
default => 'Spica::Parser::JSON',
);
# -------------------------------------------------------------------------
# auto build ar
arser> expects the name of the class that inherits C<Spica::Parser>.
By default, C<Spica::Parser::JSON> is used.
=item C<is_suppress_object_creation>
Specifies the receiver object creation mode. By