summaryrefslogblamecommitdiff
path: root/lib/Net/HTTP/API/Parser/JSON.pm
blob: d340c75cd2713a1b845b7d9cb8cde794b34e7ac4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                     
 

                      

          
                                 


                              
                                                   



                              
                                                     


  



                  
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;

=head1 SYNOPSIS

=head1 DESCRIPTION