PX-API
(
M/MI/MINDHACK/PX-API-v0.0.3.tar.gz, MINDHACK, 2007;
MetaCPAN
)
package PX::API::Response::JSON;
use warnings;
use strict;
use Carp;
use version; our $VERSION = qv('0.0.3');
use JSON;
sub new {
my $class = shift;
my $args = shift;
$class = ref($class) || $
->{'xs'} = JSON->new();
return $self;
}
sub parse {
my $self = shift;
my $json = shift;
my $xs = $self->{'xs'};
my $ref = $xs->jsonToObj($json);
return $ref;
}
sub format { 'json' }
1;
__
e::JSON - A C<PX::API::Response> plugin.
=head1 DESCRIPTION
This plugin is loaded automagically by C<PX::API::Response> when
the 'json' response format is returned from the Peekshows API.
L<JSON> i