Group
Extension

Matches 35358

App-XUL ( K/KI/KITOMER/App-XUL-0.07.tar.gz, KITOMER, 2011; MetaCPAN )
App-XUL/lib/App/XUL.pm ( view source; MetaCPAN )
een XUL and server is based on a simple
JSON based protocol. The following syntax definition tries to
define the protocol. Everything in curly brackets is a JSON object,
strings are quoted and non-ter
Test-JSYNC ( P/PA/PATCH/Test-JSYNC-0.02.tar.gz, PATCH, 2011; MetaCPAN )
Test-JSYNC/lib/Test/JSYNC.pm ( view source; MetaCPAN )
$expected_jsync, 'jsync matches what we expected';

=head1 DESCRIPTION

JSON YAML Notation Coding (JSYNC) is an extension of JSON that can serialize
any data objects.  Test::JSYNC makes it easy to ver
d_jsync> is provided as an alternative to C<jsync_ok> using the same
naming convention as L<Test::JSON> but is not exported by default.

=head2 jsync_is

Test passes if the two JSYNC strings are valid
me naming
convention as L<Test::JSON> but is not exported by default.

=head1 SEE ALSO

This module uses L<JSYNC> and L<Test::Differences>, and is based on
L<Test::JSON>.

=head1 AUTHOR

Nick Patch <p
Sloth ( C/CY/CYCLES/Sloth-0.05.tar.gz, CYCLES, 2011; MetaCPAN )
Sloth/lib/Sloth/Representation.pm ( view source; MetaCPAN )
, and creates
a representation of the resource. For example, a JSON representation
might just return the result of L<JSON::Any/encode_json>.

=head1 AUTHOR

Oliver Charles

=head1 COPYRIGHT AND LICENS
WebService-SEOmoz-API ( F/FA/FAYLAND/WebService-SEOmoz-API-0.02.tar.gz, FAYLAND, 2011; MetaCPAN )
WebService-SEOmoz-API/lib/WebService/SEOmoz/API.pm ( view source; MetaCPAN )
se strict;
use warnings;
use LWP::UserAgent;
use URI::Escape qw/uri_escape/;
use Digest::SHA;
use JSON::Any;
use vars qw/$errstr/;

sub new {
    my $class = shift;
    my $args = scalar @_ % 2 ? shif
        $args->{ua} = LWP::UserAgent->new(%$ua_args);
    }
    unless ( $args->{json} ) {
        $args->{json} = JSON::Any->new;
    }

    bless $args, $class;
}

sub errstr { $errstr }

sub getAut
is_success ) {
        $errstr = $resp->status_line;
        return;
    }

    return $self->{json}->jsonToObj( $resp->content );
}

sub getUrlMetrics {
    my $self = shift;
    my $args = scalar @_
App-XUL ( K/KI/KITOMER/App-XUL-0.07.tar.gz, KITOMER, 2011; MetaCPAN )
App-XUL/misc/server.pl ( view source; MetaCPAN )
se Socket;
use IO::Socket;
use LWP::Simple qw(get);
use URI::Escape qw(uri_escape);
use JSON qw(to_json from_json);
use Data::Dumper;

# get commandline arguments
my ($ModulesPath, $Port) = @ARGV;

# 
 else {
		$data{"_method"} = "ERROR";
	}
		
	# analyse request and create answer
	my $info = from_json($data{'data'});
	
	#print STDERR Dumper($info);
	
	my $quit = 0;
	$quit = 1 if exists $info->{'ev
t "Content-type: application/json", Socket::CRLF;
	print $client "Content-type: text/html", Socket::CRLF;
	print $client Socket::CRLF;
	print $client ((($answer && to_json($answer)) || '{"action":"non
Yahoo-Answers ( M/MA/MANTOVANI/Yahoo-Answers-0.02.tar.gz, MANTOVANI, 2011; MetaCPAN )
Yahoo-Answers/lib/Yahoo/Answers.pm ( view source; MetaCPAN )
mmon::Numeric qw/PositiveInt SingleDigit/;

use WWW::Mechanize;
use URI::QueryParam;
use URI;
use JSON;

has 'mechanize' => (
    is      => 'ro',
    isa     => 'WWW::Mechanize',
    lazy    => 1,
  
redicate => 'has_results' );

has 'output' => ( is => 'ro', isa => NonEmptySimpleStr, default => 'json' );

=head2 url_builder

Build the URL to do the "get" with all arguments that you pass
for the a
rch

Make the search, and decode the JSON, if don't have the attribute
"query", it return nothing.

=cut

sub get_search {
    my $self = shift;
    my $json = JSON->new->allow_nonref;

    # if haven
Geo-Coder-RandMcnally ( G/GR/GRAY/Geo-Coder-RandMcnally-0.01.tar.gz, GRAY, 2011; MetaCPAN )
Geo-Coder-RandMcnally/lib/Geo/Coder/RandMcnally.pm ( view source; MetaCPAN )
ckage Geo::Coder::RandMcnally;

use strict;
use warnings;

use Carp qw(croak);
use Encode ();
use JSON;
use LWP::UserAgent;
use URI;

our $VERSION = '0.01';
$VERSION = eval $VERSION;

sub new {
    my
 return unless $res->is_success;

    # Change the content type of the response from 'application/json' so
    # HTTP::Message will decode the character encoding.
    $res->content_type('text/plain');

    my $content = $res->decoded_content;
    return unless $content;

    my $data = eval { from_json($content) };
    return unless $data;

    my @results = @{ $data->{geocodedLocation} || [] };
  
WebService-Zoopla-API ( W/WB/WBASSON/WebService-Zoopla-API-0.001.tar.gz, WBASSON, 2011; MetaCPAN )
WebService-Zoopla-API/lib/WebService/Zoopla/API.pm ( view source; MetaCPAN )
  }
                        },
                        "formats" : [
                            "json",
                            "xml"
                        ]
                     }'
);

has api
ift;
        Net::HTTP::Spore->new_from_strings($self->specification)
          ->enable('Format::JSON')->enable('Runtime');
    }
);

has session_id => (
    is      => 'ro',
    lazy    => 1,
    is
t;
    my $attrs  = shift;
    $attrs->{api_key}    = $self->api_key;
    $attrs->{format}     = 'json';
    $attrs->{session_id} = $self->session_id
      if ($self->_need_session($method));
    retu
JSON-CPAN-Meta ( R/RJ/RJBS/JSON-CPAN-Meta-7.001.tar.gz, RJBS, 2011; MetaCPAN )
JSON-CPAN-Meta/lib/Module/Install/JSONMETA.pm ( view source; MetaCPAN )
odule::Install::JSONMETA;
use Module::Install::Base;

BEGIN {
  our @ISA = qw(Module::Install::Base);
  our $ISCORE  = 1;
  our $VERSION = '7.001';
}

=head1 NAME

Module::Install::JSONMETA - (depreca
ite META.json instead of META.yml

=head1 ACHTUNG

B<Achtung!>  This library will soon be obsolete as EUMM moves to use the
official L<CPAN::Meta::Spec> JSON files.

=cut

our $json;
sub jsonmeta {
  
my ($self) = @_;

  unless (eval { require JSON; JSON->VERSION(2); 1 }) {
    die "could not load JSON.pm version 2 or better; can't use jsonmeta\n"
      if $self->is_admin;
    return; # Not admin, 
JSON-CPAN-Meta ( R/RJ/RJBS/JSON-CPAN-Meta-7.001.tar.gz, RJBS, 2011; MetaCPAN )
JSON-CPAN-Meta/lib/ExtUtils/MakeMaker/JSONMETA.pm ( view source; MetaCPAN )
package ExtUtils::MakeMaker::JSONMETA;
our $VERSION = '7.001';

use ExtUtils::MM_Any;
use JSON 2;

=head1 NAME

ExtUtils::MakeMaker::JSONMETA - (deprecated) write META.json instead of META.yml

=head1
ial L<CPAN::Meta::Spec> JSON files.

In your Makefile.PL:

  use ExtUtils::MakeMaker;
  eval { require ExtUtils::MakeMaker::JSONMETA; };

  WriteMakefile(...);

If EU::MM::JSONMETA cannot be loaded (f
talling your module does not have it or JSON installed), things will
continue as usual.  If it can be loaded, a META.json file will be produced,
containing JSON.

=cut

no warnings qw(once redefine);
WebService-Bitly ( S/SH/SHIBAZAKI/WebService-Bitly-0.06.tar.gz, SHIBAZAKI, 2011; MetaCPAN )
WebService-Bitly/lib/WebService/Bitly.pm ( view source; MetaCPAN )
NIVERSAL::require;

our $VERSION = '0.06';

use URI;
use URI::QueryParam;
use LWP::UserAgent;
use JSON;

use WebService::Bitly::Result::HTTPError;

use base qw(Class::Accessor::Fast);

__PACKAGE__->mk
name);
    $url->query_param(apiKey   => $self->user_api_key);
    $url->query_param(format   => 'json');

    my $response = $self->ua->get($url);

    if (!$response->is_success) {
        return We
ice::Bitly::Result::' . $result_class;
    $result_class->require;

    my $bitly_response = from_json($response->content);
    return $result_class->new($bitly_response);
}

sub _api_url {
    my ($s
WebService-Blekko ( W/WU/WUMPUS/WebService-Blekko-1.00_07.tar.gz, WUMPUS, 2011; MetaCPAN )
WebService-Blekko/lib/WebService/Blekko/Pagestats.pm ( view source; MetaCPAN )
, $class;

    my ( $json, $error, $http_code ) = @_;

    $self->{http_code} = $http_code;
    $self->{error} = $error;

    my $answer = WebService::Blekko::my_decode_json( $json ); # XXX needs eval
WebService-Blekko ( W/WU/WUMPUS/WebService-Blekko-1.00_07.tar.gz, WUMPUS, 2011; MetaCPAN )
WebService-Blekko/lib/WebService/Blekko.pm ( view source; MetaCPAN )
Blekko JSON APIs

=cut

use strict;
use warnings;
no warnings qw( uninitialized );

use LWP::UserAgent;
use LWP::Protocol;
use HTTP::Request;
use List::Util qw( min );
use Time::HiRes;
use JSON;

use 
 $url = sprintf( $template, $self->{scheme}, $self->{server},
                       urlencode( "/json $q" ), $self->{auth}, $self->{source}, $ps, $p );

    my $req = HTTP::Request->new( 'GET', $url 
->new( '', "http failure, code is ".$resp->code, $resp->code );
    }

    my $answer = my_decode_json( $resp->content ); # XXX does this need an eval?

    if ( defined $answer->{status} && $answer->
NRD-Daemon ( J/JL/JLMARTIN/NRD-Daemon-0.04.tar.gz, JLMARTIN, 2011; MetaCPAN )
NRD-Daemon/lib/NRD/Serialize/plain.pm ( view source; MetaCPAN )
package NRD::Serialize::plain;

use strict;
use warnings;

use JSON;

use base 'NRD::Serialize';

sub new {
  my ($class, $options) = @_;
  $options = {} if (not defined $options);
  my $self = {
    
 0 }

sub helo {
   return undef;
}

sub unfreeze {
   my ($self, $recieved) = @_;
   return decode_json($recieved);
}

sub freeze {
   my ($self, $result) = @_;
   return encode_json($result);
}

1;
POE-Component-Github ( B/BI/BINGOS/POE-Component-Github-0.08.tar.gz, BINGOS, 2011; MetaCPAN )
POE-Component-Github/lib/POE/Component/Github.pm ( view source; MetaCPAN )
gs;
use POE::Component::Client::HTTP;
use HTTP::Request::Common;
use Algorithm::FloodControl;
use JSON::Any;
use Class::MOP;
use Module::Pluggable search_path => ['POE::Component::Github::Request'], e
ault => 'github.com/api/v2/json',
);

has _http_alias => (
    is      => 'rw',
    isa     => 'Str',
    default => '',
);

has 'json' => (
    is => 'ro',
    isa => 'JSON::Any',
    lazy => 1,
    
default => sub {
        return JSON::Any->new;
    }
);

has _requests => (
    is => 'ro',
    default => sub { { } },
);

has _shutdown => (
    is => 'rw',
    default => 0,
);

sub spawn {
  shif
POE-Component-Github ( B/BI/BINGOS/POE-Component-Github-0.08.tar.gz, BINGOS, 2011; MetaCPAN )
POE-Component-Github/lib/POE/Component/Github/Request/Role.pm ( view source; MetaCPAN )
sa => 'Str', default => '' );

# api
has 'api_url' => ( is => 'ro', default => 'github.com/api/v2/json/');
has 'scheme'  => ( is => 'ro', default => 'http://');
has 'auth_scheme'    => ( is => 'ro', d
WebService-Blekko ( W/WU/WUMPUS/WebService-Blekko-1.00_07.tar.gz, WUMPUS, 2011; MetaCPAN )
WebService-Blekko/lib/WebService/Blekko/QueryResultSet.pm ( view source; MetaCPAN )
lekko::QueryResult;

sub new
{
    my $class = shift;
    my $self = bless {}, $class;

    my ( $json, $http_code ) = @_;

    $self->{http_code} = $http_code;

    if ( $http_code !~ /^2/ )
    {
  
->{total_num} = 0;
        return $self;
    }

    my $answer = WebService::Blekko::my_decode_json( $json );

    $self->{raw} = $answer;

    if ( defined $answer->{ERROR} )
    {
        # {suggest
App-htrepl ( F/FR/FRIEDO/App-htrepl-0.001_01.tar.gz, FRIEDO, 2011; MetaCPAN )
App-htrepl/lib/App/htrepl.pm ( view source; MetaCPAN )
shift;

    print { $self->{outfh} } <<'END';

htrepl commands:

.header Content-Type application/json    # set header
.header Content-Type                     # remove header

.cookie ID 12345       
Config-Augeas-Exporter ( R/RA/RAPHINK/Config-Augeas-Exporter-v1.0.0.tar.gz, RAPHINK, 2011; MetaCPAN )
Config-Augeas-Exporter/lib/Config/Augeas/Exporter.pm ( view source; MetaCPAN )
XML;
use Encode qw(encode);
use YAML qw(Dump);
use JSON qw();
use File::Path qw(mkpath);

__PACKAGE__->mk_accessors(qw(to_xml to_hash to_yaml to_json from_xml));

our $VERSION = '1.0.0';

# Default va
 my $hash = $self->to_hash(%args);

   return YAML::Dump($hash);
}


=head2 to_json( ... )

Export the Augeas tree to JSON.

=over

=item path

C<path> is the Augeas path to export. If ommitted, it wi
from the export.

=back

=cut

sub to_json {
   my $self = shift;
   my %args = @_;

   my $hash = $self->to_hash(%args);

   my $json = new JSON;
   return $json->encode($hash);
}


=head2 from_xml( 
Reaction ( A/AR/ARCANEZ/Reaction-0.002005.tar.gz, ARCANEZ, 2011; MetaCPAN )
Reaction/lib/Reaction/InterfaceModel/Search/Spec.pm ( view source; MetaCPAN )
 Reaction::InterfaceModel::Search::Spec;

use Reaction::Role;
use Method::Signatures::Simple;
use JSON;
use Scalar::Util qw(weaken);
use namespace::clean -except => [ qw(meta) ];

has '_search_spec' =
all_attributes;
  return to_json(\%val, { canonical => 1 });
}

requires '_from_string_unpack_value';

method from_string ($class: $string, $other) {
  my %raw = %{from_json($string)};
  my %val;
  @v

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