Group
Extension

Matches 2

PX-API ( M/MI/MINDHACK/PX-API-v0.0.3.tar.gz, MINDHACK, 2007; MetaCPAN )
PX-API/lib/PX/API/Response/JSON.pm ( view source; 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
PX-API ( M/MI/MINDHACK/PX-API-v0.0.3.tar.gz, MINDHACK, 2007; MetaCPAN )
PX-API/lib/PX/API/Response.pm ( view source; MetaCPAN )
e Peekshows API.  This method simply 
needs to return the name of the plugin format. ie: 'rest', 'json'

=item C<parse($content)>

The C<parse()> method is called upon completion of an API call and is

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.