about summary refs log tree commit diff
path: root/lib/Net/HTTP/API/Parser/JSON.pm
blob: ea164c5ecfc78656cb7272b9c1e5bde337439383 (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
package Net::HTTP::API::Parser::JSON;

# ABSTRACT: Parse JSON

use JSON;
use Moose;
extends 'Net::HTTP::API::Parser';

sub encode {
    my ($self, $content) = @_;
    JSON::to_json($content, $self->format_options);
}

sub decode {
    my ($self, $content) = @_;
    JSON::from_json($content, $self->format_options);
}

1;

__END__

=head1 SYNOPSIS

=head1 DESCRIPTION