Group
Extension

Matches 3

WebService-Geocodio ( M/MA/MALLEN/WebService-Geocodio-0.05.tar.gz, MALLEN, 2018; MetaCPAN )
WebService-Geocodio/lib/WebService/Geocodio/JSON.pm ( view source; MetaCPAN )
vice::Geocodio::JSON;
$WebService::Geocodio::JSON::VERSION = '0.05';
# ABSTRACT: A JSON de/serializer class

use Moo::Role;
use strictures 2;
use JSON;
use Carp qw(confess);


has 'json' => (
    is =
efault => sub { JSON->new() },
);


sub encode {
    my ($self, $aref) = @_;

    return $self->json->encode($aref);
}


sub decode {
    my ($self, $data) = @_;

    return $self->json->decode($data)

WebService::Geocodio::JSON - A JSON de/serializer class

=head1 VERSION

version 0.05

=head1 ATTRIBUTES

=head2 json

A JSON serializer/deserializer instance. Default is L<JSON>.

=head1 METHODS

=h
WebService-Geocodio ( M/MA/MALLEN/WebService-Geocodio-0.05.tar.gz, MALLEN, 2018; MetaCPAN )
WebService-Geocodio/lib/WebService/Geocodio/Request.pm ( view source; MetaCPAN )
TTP::Tiny;
use Carp qw(confess);
use WebService::Geocodio::Location;

with 'WebService::Geocodio::JSON';

# ABSTRACT: A request role for Geocod.io


has 'ua' => (
    is => 'ro',
    lazy => 1,
    de
     agent => "WebService-Geocodio ",
        default_headers => { 'Content-Type' => 'application/json' },
    ) },
);


has 'base_url' => (
    is => 'ro',
    lazy => 1,
    default => sub { 'http:/
WebService-Geocodio ( M/MA/MALLEN/WebService-Geocodio-0.05.tar.gz, MALLEN, 2018; MetaCPAN )
WebService-Geocodio/lib/WebService/Geocodio.pm ( view source; MetaCPAN )

you can use a fancy object like L<WebService::Geocodio::Location> which will serialize
itself to JSON automatically.

=head2 fields

You may request the following fields be included in the results:


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