blob: 2edc71c711aa4a396b6d2ab4ac3ad5774ecec68f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package Net::HTTP::API::Parser::JSON;
# ABSTRACT: Parse JSON
use JSON;
use Moose;
extends 'Net::HTTP::API::Parser';
has _json_parser => (
is => 'rw',
isa => 'JSON',
lazy => 1,
default => sub { JSON->new->allow_nonref },
);
sub encode {
my ($self, $content) = @_;
$self->_json_parser->encode($content);
}
sub decode {
my ($self, $content) = @_;
$self->_json_parser->decode($content);
}
1;
=head1 SYNOPSIS
=head1 DESCRIPTION
|