Group
Extension

Matches 35358

JSAN-Client ( A/AD/ADAMK/JSAN-Client-0.29.tar.gz, ADAMK, 2010; MetaCPAN )
JSAN-Client/lib/JSAN/Client.pm ( view source; MetaCPAN )
  1;
}

1;

=pod

=head1 TO DO

- Add the testing dependency algorithm variant

- Add support for JSON META.yml files

=head1 SUPPORT

Bugs should be reported via the CPAN bug tracker at

L<http://rt.
JSAN-Shell ( A/AD/ADAMK/JSAN-Shell-2.04.tar.gz, ADAMK, 2010; MetaCPAN )
JSAN-Shell/lib/JSAN/Shell.pm ( view source; MetaCPAN )
ShareDir   ();
use File::UserConfig ();
use Mirror::JSON     ();
use LWP::Online      ();
use JSAN::Index      ();
use JSAN::Client     ();
use JSON             ();

our $VERSION = '2.04';
    $VERSIO
ig}->{mirror} ) {
		$self->_print("Locating closest JSAN mirror...");
		my $mirror_yaml = Mirror::JSON->read( MIRROR_INIT );
		my @mirrors = $mirror_yaml->mirrors;
		my $mirror  = $mirrors[ int rand s
,
        );
	}

	$self;
}

sub config_file {
    File::Spec->catfile($_[0]->{configdir}, 'config.json')
}


sub read_config {
    my $self = shift;
    
    my $filename = $self->config_file;
    
  
CGI-Application-Demo-Ajax ( R/RS/RSAVAGE/CGI-Application-Demo-Ajax-1.04.tgz, RSAVAGE, 2010; MetaCPAN )
CGI-Application-Demo-Ajax/lib/CGI/Application/Demo/Ajax.pm ( view source; MetaCPAN )
tion';
use strict;
use warnings;

use CGI;

use Config::Tiny;

use DBI;

use HTML::Template;

use JSON::XS;

our $VERSION = '1.04';

# -----------------------------------------------

sub build_search
-> log("Filter returned @{[scalar @$output]} results");
	$self -> log('Leaving search');

	return JSON::XS -> new() -> encode({results => $output});

} # End of search.

# ----------------------------


=head1 NAME

C<CGI::Application::Demo::Ajax> - A search engine using CGI::Application, AJAX and JSON

=head1 Synopsis

Either:

	#!/usr/bin/perl

	use CGI::Application::Demo::Ajax;

	CGI::Applicatio
App-Office-Contacts-Import-vCards ( R/RS/RSAVAGE/App-Office-Contacts-Import-vCards-1.12.tgz, RSAVAGE, 2010; MetaCPAN )
App-Office-Contacts-Import-vCards/lib/App/Office/Contacts/Import/vCards/View/vCards.pm ( view source; MetaCPAN )
package App::Office::Contacts::Import::vCards::View::vCards;

use JSON::XS;

use Moose;

extends 'App::Office::Contacts::View::Base';

use namespace::autoclean;

our $VERSION = '1.12';

# ------------
-----

sub format
{
	my($self, $output) = @_;

	$self -> log(debug => 'Entered format');

	return JSON::XS -> new -> utf8 -> encode({results => [@$output]});

} # End of format.

# -------------------
RPC-Any ( M/MK/MKANAT/RPC-Any-1.00.tar.gz, MKANAT, 2010; MetaCPAN )
RPC-Any/lib/RPC/Any/Server.pm ( view source; MetaCPAN )
ber without any
quotes on it in JSON-RPC.

=item double

A floating-point number. Translates to C<< <double> >> in XML-RPC and
a number without any quotes on it, in JSON-RPC. (Note, though, that
numbe
>> in XML-RPC and
a quoted string in JSON-RPC.

=item boolean

A true or false value. Translates to C<< <boolean> >> in XML-RPC,
with a C<0> or C<1> value. In JSON-RPC, translates to C<true> or
C<fals
ly way to transfer
binary data using RPC::Any. In XML-RPC, this translates to C<< <base64> >>.
In JSON-RPC it becomes a quoted string containing base64.

=item dateTime

A date and time. In XML-RPC, t
RPC-Any ( M/MK/MKANAT/RPC-Any-1.00.tar.gz, MKANAT, 2010; MetaCPAN )
RPC-Any/lib/RPC/Any/Server/JSONRPC/HTTP.pm ( view source; MetaCPAN )
 RPC::Any::Server::JSONRPC::HTTP;
use Moose;
use JSON::RPC::Common::Marshal::HTTP;
use HTTP::Response; # Needed because Marshal::HTTP doesn't load it.
extends 'RPC::Any::Server::JSONRPC';
with 'RPC::A
ny::Interface::HTTP';

has '+parser' => (isa => 'JSON::RPC::Common::Marshal::HTTP');

sub decode_input_to_object {
    my ($self, $request) = @_;
    if (uc($request->method) eq 'POST' and $request->c
 eq '') {
        $self->exception("ParseError",
                         "You did not supply any JSON to parse in the POST body.");
    }
    elsif (uc($request->method) eq 'GET' and !$request->uri->
RPC-Any ( M/MK/MKANAT/RPC-Any-1.00.tar.gz, MKANAT, 2010; MetaCPAN )
RPC-Any/lib/RPC/Any/Server/JSONRPC/CGI.pm ( view source; MetaCPAN )
erver::JSONRPC::CGI;
use Moose;
extends 'RPC::Any::Server::JSONRPC::HTTP';
with "RPC::Any::Interface::CGI";

__PACKAGE__->meta->make_immutable;

1;

__END__

=head1 NAME

RPC::Any::Server::JSONRPC::CG

=head1 SYNOPSIS

 use RPC::Any::Server::JSONRPC::CGI;
 # Create a server where calling Foo.bar will call My::Module->bar.
 my $server = RPC::Any::Server::JSONRPC::CGI->new(
    dispatch  => { 'Foo' =
> 'My::Module' },
    allow_get => 0,
 );
 # Read JSON from STDIN, headers from the environment. Print result,
 # including HTTP headers for a CGI environment, to STDOUT.
 print $server->handle_input(
RPC-Any ( M/MK/MKANAT/RPC-Any-1.00.tar.gz, MKANAT, 2010; MetaCPAN )
RPC-Any/lib/RPC/Any/Package/JSONRPC.pm ( view source; MetaCPAN )
package RPC::Any::Package::JSONRPC;
use strict;
use JSON;
use MIME::Base64;

BEGIN { *rpc_type = \&type };

sub type {
    my ($self, $type, $value) = @_;

    # This is the only type that does someth
g special with undef.
    if ($type eq 'boolean') {
        return $value ? JSON::true : JSON::false;
    }

    return JSON::null if !defined $value or $type eq 'nil';

    my $retval = $value;

    
al = 0.0 + $value;
    }
    elsif ($type eq 'string') {
        # Forces string context, so that JSON will make it a string.
        $retval = "$value";
    }
    elsif ($type eq 'base64') {
        
RPC-Any ( M/MK/MKANAT/RPC-Any-1.00.tar.gz, MKANAT, 2010; MetaCPAN )
RPC-Any/lib/RPC/Any.pm ( view source; MetaCPAN )
PC and JSON-RPC.

=head1 DESCRIPTION

RPC::Any is a simple, unified interface to multiple RPC protocols.
Right now it supports L<XML-RPC|http://www.xmlrpc.com/> and all
three versions of L<JSON-RPC|ht
tp://groups.google.com/group/json-rpc/web>
(1.0, 1.1, and 2.0).

The goal of RPC::Any is to be simple to use, and to be highly extendable.
RPC::Any is designed to work properly in taint mode, and full
App-Office-Contacts-Import-vCards ( R/RS/RSAVAGE/App-Office-Contacts-Import-vCards-1.12.tgz, RSAVAGE, 2010; MetaCPAN )
App-Office-Contacts-Import-vCards/lib/App/Office/Contacts/Import/vCards/Util/vCards.pm ( view source; MetaCPAN )
pp::Office::Contacts::Import::vCards::Util::vCards;

# Purpose:
#	Read vCards in XML format.

use JSON::XS;

use XML::SAX::ParserFactory;

use Moose;

extends (qw/Moose::Object XML::SAX::Base/);

has 
RPC-Any ( M/MK/MKANAT/RPC-Any-1.00.tar.gz, MKANAT, 2010; MetaCPAN )
RPC-Any/lib/RPC/Any/Server/JSONRPC.pm ( view source; MetaCPAN )
ny::Server::JSONRPC;
use Moose;
use Class::MOP;
use JSON::RPC::Common::Marshal::Text;
use RPC::XML qw(smart_encode);

extends 'RPC::Any::Server';

has parser    => (is => 'rw', isa => 'JSON::RPC::Comm
on::Marshal::Text',
                  lazy_build => 1);
has _last_call => (is => 'rw', isa => 'JSON::RPC::Common::Procedure::Call',
                   clearer => '_clear_last_call');
has default_versi
 => 'rw', isa => 'Str', default => '2.0');
has '+package_base' => (default => 'RPC::Any::Package::JSONRPC');

before 'get_input' => sub {
    my $self = shift;
    $self->_clear_last_call();
};

sub d
RPC-Any ( M/MK/MKANAT/RPC-Any-1.00.tar.gz, MKANAT, 2010; MetaCPAN )
RPC-Any/lib/RPC/Any/Exception.pm ( view source; MetaCPAN )
ified at
L<http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php> (which
are valid for both JSON-RPC and XML-RPC).

What follows is a brief description of each type of error (which is
a subclass
DBIx-CouchLike ( F/FU/FUJIWARA/DBIx-CouchLike-0.16.tar.gz, FUJIWARA, 2010; MetaCPAN )
DBIx-CouchLike/lib/DBIx/CouchLike.pm ( view source; MetaCPAN )
package DBIx::CouchLike;

use 5.8.1;
use strict;
use warnings;
use Carp;
use JSON 2.0 ();
use UNIVERSAL::require;
use base qw/ Class::Accessor::Fast /;
use DBIx::CouchLike::Iterator;
use DBIx::CouchLi
able utf8 _json trace versioning /);

sub new {
    my $class = shift;
    my $self  = $class->SUPER::new(@_);
    $self->{utf8} = 1 unless defined $self->{utf8};

    $self->{_json} = JSON->new;
    
   $self->{_json}->utf8( $self->{utf8} );
        _setup_downgrade() if !$self->{utf8} && !$RD;
    }
    $self->{utf8};
}

sub to_json {
    my $self = shift;
    my $json = $self->{_json}->encode(sh
DBIx-CouchLike ( F/FU/FUJIWARA/DBIx-CouchLike-0.16.tar.gz, FUJIWARA, 2010; MetaCPAN )
DBIx-CouchLike/lib/DBIx/CouchLike/Iterator.pm ( view source; MetaCPAN )
                 ? $couch->from_json($r->[2])
                 : $r->[2],
    };
    if ( $self->{query}->{include_docs} ) {
        $res->{document} = $couch->from_json($r->[3]);
        $res->{docum
KiokuDB-Cmd ( N/NU/NUFFIN/KiokuDB-Cmd-0.03.tar.gz, NUFFIN, 2010; MetaCPAN )
KiokuDB-Cmd/lib/KiokuDB/Cmd/Command/Load.pm ( view source; MetaCPAN )
 it isn't provided.

=item format

=item formatter

C<format> is one of C<yaml>, C<storable> or C<json>, defaulting to C<yaml>.

C<formatter> is a code reference that is provided with a file handle an
KiokuDB-Cmd ( N/NU/NUFFIN/KiokuDB-Cmd-0.03.tar.gz, NUFFIN, 2010; MetaCPAN )
KiokuDB-Cmd/lib/KiokuDB/Cmd/Command/Edit.pm ( view source; MetaCPAN )
roc::InvokeEditor>.

=item format

=item formatter

C<format> is one of C<yaml>, C<storable> or C<json>, defaulting to C<yaml>.

C<formatter> is a code reference which takes an entry as an argument. I
KiokuDB-Cmd ( N/NU/NUFFIN/KiokuDB-Cmd-0.03.tar.gz, NUFFIN, 2010; MetaCPAN )
KiokuDB-Cmd/lib/KiokuDB/Cmd/DumpFormatter.pm ( view source; MetaCPAN )
 "ro",
    default => "yaml",
    cmd_aliases => "f",
    documentation => "dump format ('yaml', 'json', 'storable', etc)"
);

has serializer => (
    traits => [qw(NoGetopt EarlyBuild)],
    isa => "
KiokuDB-Cmd ( N/NU/NUFFIN/KiokuDB-Cmd-0.03.tar.gz, NUFFIN, 2010; MetaCPAN )
KiokuDB-Cmd/lib/KiokuDB/Cmd/Command/Dump.pm ( view source; MetaCPAN )
 it isn't provided.

=item format

=item formatter

C<format> is one of C<yaml>, C<storable> or C<json>, defaulting to C<yaml>.

C<formatter> is a code reference which takes an entry as an argument. I
Class-Discover ( A/AS/ASH/Class-Discover-1.000003.tar.gz, ASH, 2010; MetaCPAN )
Class-Discover/lib/Class/Discover.pm ( view source; MetaCPAN )
s class is designed primarily for tools that whish to populate the
C<provides> field of META.{yml,json} files so that the CPAN indexer will pay
attention to the existance of your classes, rather than 
App-Context ( S/SP/SPADKINS/App-Context-0.968.tar.gz, SPADKINS, 2010; MetaCPAN )
App-Context/lib/App/Request/CGI.pm ( view source; MetaCPAN )
]+$!!;  # delete trailing :<returntype>
            $path_info =~ s!\.(html|xml|yaml|csv|pdf|perl|json)$!!;  # delete trailing .<returntype>

            if ($path_info =~ s!^/([A-Z][A-Za-z0-9]*)/!/!)
         $returntype = $1;
        }
        elsif ($path_info =~ m!\.(html|xml|yaml|csv|pdf|perl|json)$!) {
            $returntype = $1;
        }
        $self->{returntype} = $returntype;
    }
  

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