Group
Extension

Matches 35359

Dancer-Session-DBI ( J/JA/JAITKEN/Dancer-Session-DBI-1.0.0.tar.gz, JAITKEN, 2012; MetaCPAN )
Dancer-Session-DBI/lib/Dancer/Session/DBI.pm ( view source; MetaCPAN )
>. The default serialization method is L<JSON>,
though one can specify any serialization format you want. L<YAML> and L<Storable> are
viable alternatives.

JSON was chosen as the default serialization
on ephemeral - Store it compactly
    return to_json({%$self}, { pretty => 0 });
}


# Default Deserialize method
sub _deserialize {
    my ($self, $json) = @_;
    my $settings = setting('session_opt
efined $settings->{deserializer}) {
        return $settings->{deserializer}->($json);
    }

    return from_json($json);
}



=head1 SEE ALSO

L<Dancer>, L<Dancer::Session>, L<Plack::Session::Store:
Dancer-Plugin-ExtDirect ( A/AA/AAR/Dancer-Plugin-ExtDirect-1.03.tar.gz, AAR, 2012; MetaCPAN )
Dancer-Plugin-ExtDirect/lib/Dancer/Plugin/ExtDirect.pm ( view source; MetaCPAN )
Direct plugin for Dancer
use strict;
use warnings;

use Dancer ':syntax';
use Dancer::Plugin;
use JSON ();

# The best Ext Direct docs out there are provided by the Django implementation:
# https://gi
Handler => JSON::true) : (),
                };
            }
        }
        
        content_type 'text/javascript';
        sprintf "Ext.Direct.addProvider(%s);\n",
            to_json {
        
Type|Upload)$/, keys %{&params} } ],
            };
        } else {
            $requests = from_json(request->body)
                or return status 400;
            
            # wrap the request 
Task-BeLike-RSRCHBOY-Web ( R/RS/RSRCHBOY/Task-BeLike-RSRCHBOY-Web-0.002.tar.gz, RSRCHBOY, 2012; MetaCPAN )
Task-BeLike-RSRCHBOY-Web/lib/Task/BeLike/RSRCHBOY/Web.pm ( view source; MetaCPAN )
ead3 L<HTML::Builder> 0.006

=head3 L<Text::Haml>

=head3 L<Template>

=head3 L<Template::Plugin::JSON::Escape>

=head1 AUTHOR

Chris Weyl <cweyl@alumni.drew.edu>

=head1 COPYRIGHT AND LICENSE

This s
Class-ReluctantORM ( C/CL/CLWOLFE/Class-ReluctantORM-0.52_0.tar.gz, CLWOLFE, 2012; MetaCPAN )
Class-ReluctantORM/lib/Class/ReluctantORM/SchemaCache.pm ( view source; MetaCPAN )
se Carp;
use Class::ReluctantORM::Utilities qw(conditional_load_subdir read_file write_file json_encode json_decode);

our @POLICY_CLASSES;
BEGIN {
    @POLICY_CLASSES = conditional_load_subdir(__PACK
 = json_decode($raw);
}

sub write_cache_file {
    my $self = shift;
    my $filename = Class::ReluctantORM->get_global_option('schema_cache_file');
    return unless $filename;

    my $raw = json_e
CatalystX-OAuth2 ( E/ED/EDENC/CatalystX-OAuth2-0.001002.tar.gz, EDENC, 2012; MetaCPAN )
CatalystX-OAuth2/lib/Catalyst/Authentication/Credential/OAuth2.pm ( view source; MetaCPAN )
uth2;
use Moose;
use MooseX::Types::Common::String qw(NonEmptySimpleStr);
use LWP::UserAgent;
use JSON::Any;
use Moose::Util;

# ABSTRACT: Authenticate against OAuth2 servers


has [qw(grant_uri token
nfo->{state} if exists $auth_info->{state};
  $uri->query_form($query);
  return $uri;
}

my $j = JSON::Any->new;

sub request_access_token {
  my ( $self, $callback_uri, $code, $auth_info ) = @_;
  m
uery);
  my $response = $self->ua->get($uri);
  return unless $response->is_success;
  return $j->jsonToObj( $response->decoded_content );
}

1;

__END__
=pod

=head1 NAME

Catalyst::Authentication::C
CatalystX-OAuth2 ( E/ED/EDENC/CatalystX-OAuth2-0.001002.tar.gz, EDENC, 2012; MetaCPAN )
CatalystX-OAuth2/lib/CatalystX/OAuth2/ActionRole/Token.pm ( view source; MetaCPAN )
e::Token;
use Moose::Role;
use JSON::Any;

# ABSTRACT: A role for building token-building actions

with 'CatalystX::OAuth2::ActionRole::RequestInjector';

my $json = JSON::Any->new;

after execute => 
sub {
  my($self, $controller, $c) = @_;
  $c->res->body($json->objToJson($c->req->oauth2->query_parameters));
};

1;

__END__
=pod

=head1 NAME

CatalystX::OAuth2::ActionRole::Token - A role for buil
File-ANVL ( J/JA/JAK/File-ANVL-1.05.tar.gz, JAK, 2012; MetaCPAN )
File-ANVL/lib/File/ERC.pm ( view source; MetaCPAN )
ord, which
can be represented in a variety of underlying syntaxes, such as ANVL,
Turtle, XML, and JSON.  The ERC elements include Dublin Core Kernel
metadata.

=head1 SEE ALSO

A Metadata Kernel for E
Biblio-Thesaurus ( A/AM/AMBS/Biblio/Biblio-Thesaurus-0.43.tar.gz, AMBS, 2012; MetaCPAN )
Biblio-Thesaurus/lib/Biblio/Thesaurus.pm ( view source; MetaCPAN )
;
}

##
#
#
sub toJson {
    my ($self, $rel) = @_;
    $rel //= "NT";
    $rel = [$rel] unless ref($rel);
    my $top = $self->topName;
    $self->_toJson($top, $rel);
}

sub _toJson {
    my ($self,
json = "{ \"data\": \"$term\", \"attr\":{id:\"$term\"}";
    if (keys %$h) {
        $json .= ", \"children\": [";
        $json .= join(", ", map { $self->_toJson($_, $rel) } keys %$h);
        $json
 .= "]"
    }
    $json .= "}";
}

###
#
#
sub _tc_aux {
  my ($self,$term,$vis,@relat) = @_;
  $term = $self->getdefinition($term);
  my %r = ( $term => 1 );
  for ($self->terms($term,@relat)) {
    
CPAN-Source ( C/CO/CORNELIUS/CPAN-Source-0.04.tar.gz, CORNELIUS, 2012; MetaCPAN )
CPAN-Source/lib/CPAN/Source/Dist.pm ( view source; MetaCPAN )
urity 
    filename 
    cpanid 
    extension 
    pathname
    source_path 
    _parent
));
use JSON::XS;
use YAML::XS;
use URI;
use overload '""' => \&to_string;

# CPAN::DistnameInfo compatible
su
cpanid,
        extension => $self->extension,
        pathname  => $self->pathname,
        source_path => $self->source_path,
    };
}

sub to_string { 
    return encode_json( $_[0]->data );
}

1;
CPAN-Source ( C/CO/CORNELIUS/CPAN-Source-0.04.tar.gz, CORNELIUS, 2012; MetaCPAN )
CPAN-Source/lib/CPAN/Source.pm ( view source; MetaCPAN )
 Cache::File;
use DateTime;
use DateTime::Format::HTTP;
use CPAN::DistnameInfo;
use YAML::XS;
use JSON::XS;

use CPAN::Source::Dist;
use CPAN::Source::Package;

use constant { DEBUG => $ENV{DEBUG} };
       return unless $self->mirror;
        # get 07mirror.json
        my $json = $self->fetch_mirrors;
        my $data = decode_json( $json );
        return $data;
    };

sub debug { 
    say "[D
ist_txt ) );
}

sub recent {
    my ($self,$period) = @_;
    my $json = $self->fetch_recent( $period );
    return decode_json( $json );
}

sub parse_modlist { 
    my ($self,$modlist_data) = @_;

  
Class-ReluctantORM ( C/CL/CLWOLFE/Class-ReluctantORM-0.52_0.tar.gz, CLWOLFE, 2012; MetaCPAN )
Class-ReluctantORM/lib/Class/ReluctantORM.pm ( view source; MetaCPAN )
, where schema data will be cached.  Ignored if schema_cache_policy is NONE.  The file will be in JSON format.  No default provided.

=back

=cut

sub get_global_option {
    my $inv = shift;
    my $
WebService-Face ( A/AA/AASSAD/WebService-Face-0.04.tar.gz, AASSAD, 2012; MetaCPAN )
WebService-Face/lib/WebService/Face/Client.pm ( view source; MetaCPAN )
use warnings;
use Carp;

use WebService::Face::Response;
use WebService::Face::Response::Tag;
use JSON;
use REST::Client;

=head1 NAME

WebService::Face::Client - Client to the Face.com REST API

=hea
et_header(Authorization => "Basic $creds");
    #        $self->set_header(Accept => "application/json");

    return $self;
}

=head2 faces_detect ( \%params )

Returns tags for detected faces in one
 .= "&$key=" . $params->{$key};
    }

    return $self->_process_response( 'GET', "/faces/detect.json?" . $self->_get_credential_parameters() . $parameters );
}

=head2 faces_train ( \%params )

Call
Class-ReluctantORM ( C/CL/CLWOLFE/Class-ReluctantORM-0.52_0.tar.gz, CLWOLFE, 2012; MetaCPAN )
Class-ReluctantORM/lib/Class/ReluctantORM/Utilities.pm ( view source; MetaCPAN )
XPORT_TAGS = ();

use Class::ReluctantORM::Exception;
use Lingua::EN::Inflect;
use Sub::Name;
use JSON;

our $DEBUG = 0;


=head1 SUBROUTINES

=cut

=head2 install_method('Class', 'method_name', $code


=head2 $json_string = json_encode($perl_ref);

Version-blind JSON encoder.

=cut

push @EXPORT_OK, 'json_encode';
sub json_encode {
    if ($JSON::VERSION > 2) {
        goto &JSON::to_json;
    } e

        goto &JSON::objToJson;
    }
}

=head2 $perl_ref = json_decode($json_string);

Version-blind JSON decoder.

=cut

push @EXPORT_OK, 'json_decode';
sub json_decode {
    if ($JSON::VERSION > 2)
File-ANVL ( J/JA/JAK/File-ANVL-1.05.tar.gz, JAK, 2012; MetaCPAN )
File-ANVL/lib/File/ANVL.pm ( view source; MetaCPAN )
mber of values for keys (eg,
		# for turtle, $$o{subject}).  $recnum is useful for
		# outputting json separators (eg, no comma if $recnum eq 1)
		# or record numbers in comments (eg, if $$o{verbose})
 Specific conversions, based on an "output multiplexer"
L<File::OM>, are possible to XML, Turtle, JSON, CSV, and PSV (Pipe
Separated Value), and Plain unlabeled text.

The B<OM> package can also be us
ively. Array
element 1 always contains a string naming the format of the input, such
as, "ANVL", "JSON", "XML", etc.

The remaining triples are free form except that the values will have been
drawn fr
App-AltSQL ( E/EW/EWATERS/App-AltSQL-0.05.tar.gz, EWATERS, 2012; MetaCPAN )
App-AltSQL/lib/App/AltSQL/Term.pm ( view source; MetaCPAN )
ckage App::AltSQL::Term;

use Moose;
use Term::ReadLine::Zoid;
use Data::Dumper;
use JSON qw(encode_json decode_json);
use Term::ANSIColor;

with 'App::AltSQL::Role';
with 'MooseX::Object::Pluggable';
		return;
	}

	open my $out, '>', $fn or die "Can't open $fn for writing: $!";
	print $out encode_json({ history => [ $self->term->GetHistory ] });
	close $out;
}

sub read_history {
	my ($self, $fn) 
";
	local $\ = undef;
	my $data = <$in>;
	close $in;

	my @history;
	eval {
		my $parsed = decode_json($data);
		@history = @{ $parsed->{history} };
	};
	if (my $exception = $@) {
		$self->log_error("
DHTMLX-Core ( E/ED/EDUARDOW/DHTMLX-Core-0.004.tar.gz, EDUARDOW, 2012; MetaCPAN )
DHTMLX-Core/lib/DHTMLX/Core.pm ( view source; MetaCPAN )
ABSTRACT: Basics tasks on DHTMLX Perl module

    use strict;
	use warnings 'all';
	use DBI;
	use JSON;
	use HTML::Entities;

	use POSIX qw(locale_h strtod setlocale LC_MONETARY LC_CTYPE);
	
	# config

    # prints
    
     	{
	    "response":"foo is undefined",
	    "status":"error"
	}

Prints a JSON string with errors details and exit the application;


=cut
	sub error
	{
	    my($self, $strErro
 %resposta = (
		status  => "error",
		response =>  $strErro,
	    );
	    my $json = \%resposta;
	    print to_json($json, { utf8  => 1 });
	    exit;
	}
	
=head2 Post
    
    my $value_from_post = 
App-AltSQL ( E/EW/EWATERS/App-AltSQL-0.05.tar.gz, EWATERS, 2012; MetaCPAN )
App-AltSQL/lib/App/AltSQL/Plugin/Dump.pm ( view source; MetaCPAN )
:Dump::Format;

=head1 Name

Dump AltSQL Plugin

=head1 Synopsis

Usage:

 .dump <file>.[csv|html|json|pl|pm|sql|xls|xml|yaml|yml] <query>;

=head1 Description

This plugin will allow you to dump out 
</td><td>Pie</td></tr><tr><td>3</td><td>Cow</td></tr></table>

=end html

JSON:

 .dump out.json select * from users;

out.json:

 [{"name":"Moo","id":"1"},{"name":"Pie","id":"2"},{"name":"Cow","id":"
or("Usage: .dump \$filename \$sql");
        $self->log_error("Available formats: csv, xls, html, json, [pl|pm], sql, xml, [yml|yaml]");

        return 1; # handled, won't run this as a query
    }

DHTMLX-Connector ( E/ED/EDUARDOW/DHTMLX-Connector-0.002.tar.gz, EDUARDOW, 2012; MetaCPAN )
DHTMLX-Connector/lib/DHTMLX/Connector.pm ( view source; MetaCPAN )
ing" };
    $columns{last_name} = {operator => "ILIKE", type => "string" };

    
    $connector->jsonForGrid( $table, $primary_key, \%columns );
    
    $connector->xmlForGrid( $table, $primary_key,
ACT

=cut

# ABSTRACT: DHTMLX Perl connector
    
    use strict;
    use warnings 'all';
    use JSON;
    use XML::Mini::Document;
    use Locale::Currency::Format;
    
    use vars qw (
	    $VERS
rency = $self->{currency};
	}

        bless $self, $class;
        return $self;
    }
 
    sub jsonForGrid
    {
        my($self, $table, $primary_key, $columns, $nRegPag, $isSmartRendering, $iden
Catalyst-Plugin-Server-JSONRPC-Batch ( D/DI/DIONYS/Catalyst-Plugin-Server-JSONRPC-Batch-0.02.tar.gz, DIONYS, 2012; MetaCPAN )
Catalyst-Plugin-Server-JSONRPC-Batch/lib/Catalyst/Plugin/Server/JSONRPC/Batch.pm ( view source; MetaCPAN )
gin::Server::JSONRPC::Batch;

use strict;
use warnings;

use Class::Load ();
use HTTP::Body ();


our $VERSION = '0.02';

our $Method = 'system.handle_batch';


BEGIN {
	my $class = 'JSON::RPC::Common
q 'ARRAY') {
				return $class->new_from_data(
					jsonrpc => '2.0',
					id      => scalar(time()),
					method  => $Catalyst::Plugin::Server::JSONRPC::Batch::Method,
					params  => $args[0]
				);
up_engine {
	my $app = shift();

	$app->server->jsonrpc->add_private_method(
		$Method => sub {
			my ($c, @args) = @_;

			my $config = $c->server->jsonrpc->config;
			my $req    = $c->req;
			my $re
Bot-Cobalt-DB-Term ( A/AV/AVENJ/Bot-Cobalt-DB-Term-0.001.tar.gz, AVENJ, 2012; MetaCPAN )
Bot-Cobalt-DB-Term/lib/Bot/Cobalt/DB/Term.pm ( view source; MetaCPAN )
      " Inserts raw data as the value of the specified key.",
      " Note that <data> is usually JSON.",
    ],
 
    putref => [
      "putref <key> <perl data>",
      " Inserts a serialized Perl d
{
    print $o "Usage: getref <key>\n";
    return
  }

  my $ser = Bot::Cobalt::Serializer->new('JSON');

  unless ( $db->dbopen(ro => 1) ) {
    print $o "Database open failure\n";
    return
  }
  
f;
  eval { $ref = $ser->thaw($item) };
  if ($@) {
    print $o "Could not thaw value; maybe not JSON?\n";
    return
  }
  
  unless (ref $ref) {
    print $o "Thawed value not a reference\n";
    r

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