Group
Extension

Matches 35359

Gideon ( D/DI/DICHI/Gideon-0.0.3.tar.gz, DICHI, 2013; MetaCPAN )
Gideon/lib/Gideon/Plugin/Cache.pm ( view source; MetaCPAN )
ugin::Cache::VERSION = '0.0.3';
}
use Moose;
use JSON;
use Gideon::Registry;

#ABSTRACT: Cache Plugin

extends 'Gideon::Plugin';

my $serializer = JSON->new->utf8->canonical;

sub find_one {
    my ( 
Seis ( T/TO/TOKUHIROM/Seis-0.12.tar.gz, TOKUHIROM, 2013; MetaCPAN )
Seis/lib/Seis/Bool.pm ( view source; MetaCPAN )
ned $_[0]) ? false :
    (exists $bool_vals->{overload::StrVal($_[0])}) ? true : false;
}

sub TO_JSON { ${$_[0]} ? \1 : \0 }

sub isa {
    my ($self, $stuff) = @_;
    return UNIVERSAL::isa($self, $
EntityModel ( T/TE/TEAM/EntityModel-0.102.tar.gz, TEAM, 2013; MetaCPAN )
EntityModel/lib/EntityModel/App.pm ( view source; MetaCPAN )
ss {
	model	=> { type => 'EntityModel::Model' },
};
use EntityModel;
use EntityModel::Definition::JSON;
use EntityModel::Definition::XML;
use Module::Load;

=head1 NAME

EntityModel::App - interface t
.json$/) {
		$model->load_from(
			JSON => { file => $file }
		);
	} elsif($file =~ /\.xml$/) {
		$model->load_from(
			XML => { file => $file }
		);
	} else {
		die "Unknown extension, expected .json
elf->show_model;
	},

	'export' => sub {
		my $self = shift;
		my $def = EntityModel::Definition::JSON->new;
		$def->model($self->model);
		print $def->save(string => '');
	},

	'merge' => sub {
		my 
Seis ( T/TO/TOKUHIROM/Seis-0.12.tar.gz, TOKUHIROM, 2013; MetaCPAN )
Seis/lib/Seis/CLI.pm ( view source; MetaCPAN )
ccessor
    accessors => {
        map { $_ => $_ } qw(
            dump_ast
            dump_ast_json
            dump_compiled
            compile_only
        )
    }
;

sub new {
    my $class = s
 \$self->{dump_compiled},
        'ast'       => \$self->{dump_ast},
        'ast-json'       => \$self->{dump_ast_json},
        'c'         => \$self->{compile_only},
    );

    if (defined $eval) 
**\n";
        print "\n\n";
    }
    if ($self->dump_ast_json) {
        require JSON::PP;
        print "*** AST ***\n";
        print JSON::PP->new->pretty(1)->encode(Perl6::PVIP->new->parse_strin
Geo-Google-PolylineEncoder ( R/RR/RRWO/Geo-Google-PolylineEncoder-0.06.tar.gz, RRWO, 2013; MetaCPAN )
Geo-Google-PolylineEncoder/lib/Geo/Google/PolylineEncoder.pm ( view source; MetaCPAN )
C_mqNvxq`@
  print $eline->{levels};      # POP

  # in Javascript, assuming eline was encoded as JSON:
  # ... load GMap2 ...
  var opts = {
    points: eline.points,
    levels: eline.levels,
    nu
num_levels => int($num_levels),
   zoom_factor => int($zoom_factor),
  };

You can then use the L<JSON> modules (or XML, or whatever) to pass the encoded
values to your Javascript application for use 
/GoogleMaps/EncodePolyline/PolylineEncoderClass.html>
(JavaScript implementation),
L<http://www.usnaviguide.com/google-encode.htm> (similar implementation in perl),
L<Geo::Google>,
L<JSON::Any>

=cut
App-jsonschema ( A/AN/ANDREFS/App-jsonschema-0.03.tar.gz, ANDREFS, 2013; MetaCPAN )
App-jsonschema/lib/App/jsonschema.pm ( view source; MetaCPAN )
use strict;
use warnings;
package App::jsonschema;
{
  $App::jsonschema::VERSION = '0.03';
}
use JSON::Schema;
use JSON qw/from_json/;
use autodie;
use Moo;
use feature qw/say/;
use Data::Dump qw/dump
/;


# ABSTRACT: Command-line utility to validate JSON using JSON Schema


has schema_file => ( 
	is 			=> 'rw', 
	required 	=> 1,
	isa 		=> sub { die "Could not find file '$_[0]'!" unless -f $_[0] }
 'lazy' );
has validator	=> ( is => 'lazy' );

sub _build_validator  {
	my $self = shift;
	return JSON::Schema->new($self->schema);
}

sub _build_schema {
	my $self = shift;
	my $schema;
	{
		local $/
Gideon ( D/DI/DICHI/Gideon-0.0.3.tar.gz, DICHI, 2013; MetaCPAN )
Gideon/lib/Gideon/Meta/Attribute/Trait/Inflate.pm ( view source; MetaCPAN )
N

version 0.0.3

=head1 SYNOPSIS

  # Store a document as JSON in the database

  package Document;
  use Gideon driver => 'DBI';
  use JSON;

  ...

  has content => (
    is => 'rw',
    traits => 
[ 'Gideon::DBI::Column', 'Gideon::Inflate' ],
    inflator => sub { decode_json $_[0] },
    deflator => sub { encode_json $_[0] }
  );

=head1 DESCRIPTION

It allows you to configurate an inflate and
EntityModel ( T/TE/TEAM/EntityModel-0.102.tar.gz, TEAM, 2013; MetaCPAN )
EntityModel/lib/EntityModel.pm ( view source; MetaCPAN )
2

=head1 SYNOPSIS

 use EntityModel;
 # Define model
 my $model = EntityModel->new->load_from(
 	JSON => { entity : [
		{ name : 'article', field : [
			{ name : 'idarticle', type : 'bigserial' },
		
s:

=over 4

=item * Type - must be a valid L<EntityModel::Definition> subclass, such as 'Perl', 'JSON' or 'XML'.

=item * Definition - dependent on the subclass, typically the filename or raw string 
 name => 'value', type => 'varchar' },
    ],
   ],
  }
 );

or the equivalent from JSON:

 $model->load_from(
  JSON => \q{
   "name" : "kvstore",
   "entity" : [
    "name" : "object",
    "primary"
FWS-V2 ( N/NA/NATELEWIS/FWS-V2-1.13091122.tar.gz, NATELEWIS, 2013; MetaCPAN )
FWS-V2/lib/FWS/V2/Safety.pm ( view source; MetaCPAN )
/_/sg;
    $incomingText =~ s/^\s+//;
    return $incomingText;
}


=head2 safeJSON

Replace any thing harmful to an JSON node that could cause it to fail.  It will escape stuff like quotes and such.
This "Can not" be in json';
    my $safeSillyNode = $fws->safeJSON( $sillyNode );
    print 'Safe JSON: '.$sillyNode;

=cut


sub safeJSON {
    my ( $self, $incomingText ) = @_;
    $incomingText =~ 
EntityModel ( T/TE/TEAM/EntityModel-0.102.tar.gz, TEAM, 2013; MetaCPAN )
EntityModel/lib/EntityModel.pod ( view source; MetaCPAN )
2

=head1 SYNOPSIS

 use EntityModel;
 # Define model
 my $model = EntityModel->new->load_from(
 	JSON => { entity : [
		{ name : 'article', field : [
			{ name : 'idarticle', type : 'bigserial' },
		
s:

=over 4

=item * Type - must be a valid L<EntityModel::Definition> subclass, such as 'Perl', 'JSON' or 'XML'.

=item * Definition - dependent on the subclass, typically the filename or raw string 
 name => 'value', type => 'varchar' },
    ],
   ],
  }
 );

or the equivalent from JSON:

 $model->load_from(
  JSON => \q{
   "name" : "kvstore",
   "entity" : [
    "name" : "object",
    "primary"
Devel-SizeMe ( T/TI/TIMB/Devel-SizeMe-0.19.tar.gz, TIMB, 2013; MetaCPAN )
Devel-SizeMe/bin/sizeme_graph.pl ( view source; MetaCPAN )

use JSON::XS;
use HTML::Entities qw(encode_entities);
use Getopt::Long;
use Devel::Dwarn;
use Devel::SizeMe::Graph;
use DBI;

my $dbh;
my %node_queue;
my %node_cache;
my $db_modtime;
my $j = JSON::XS
html<span class="divider">$divider</span></li>}
    } @{$response{name_path}};

    $self->render(json => \%response);
};

sub _set_node_queue {
    my $nodes = shift;
    ++$node_queue{$_} for @$node
)); # numify
    $node->{leaves} = $j->decode(delete $node->{leaves_json});
    $node->{attr}   = $j->decode(delete $node->{attr_json});
    return $node;
}

sub _fetch_node_tree {
    my ($id, $depth
EntityModel ( T/TE/TEAM/EntityModel-0.102.tar.gz, TEAM, 2013; MetaCPAN )
EntityModel/lib/EntityModel/Tutorial.pod ( view source; MetaCPAN )
 create tutorial.json

Add an entity:

 entitymodel edit tutorial.json add entity name=something auto_primary=true

Add a field to an existing entity:

 entitymodel edit tutorial.json entity something
utorial.json entity something add field name=unwanted type=text
 entitymodel edit tutorial.json entity something remove field name=unwanted

Display the model:

 entitymodel show tutorial.json

=head2
orial.json insert ...

=head2 Integrating with other systems

If you already have SQL schema as a starting point, you can import this and
generate a new model.

 entitymodel import tutorial.json from 
Tiffany ( T/TO/TOKUHIROM/Tiffany-1.01.tar.gz, TOKUHIROM, 2013; MetaCPAN )
Tiffany/lib/Tiffany.pm ( view source; MetaCPAN )
g/sinatraish/>.

=head1 FAQ

=over 4

=item Is Tiffany supports JSON?

Tiffany should not support JSON. Tiffany protocol can support JSON serialize.
But real web application needs more things like Con
EntityModel ( T/TE/TEAM/EntityModel-0.102.tar.gz, TEAM, 2013; MetaCPAN )
EntityModel/lib/EntityModel/Definition/JSON.pod ( view source; MetaCPAN )
ot edit
this file, but rather the original, inline with EntityModel::Definition::JSON
at lib/EntityModel/Definition/JSON.pm
(on the system that originally ran this).
If you do edit this file, and don'
 to be removed, make
sure you change the first line.

=cut

=head1 NAME

EntityModel::Definition::JSON - definition support for L<EntityModel>

=head1 VERSION

version 0.102

=head1 SYNOPSIS

See L<En
 to a file.

=head2 save_string

Return output as a scalar.

=head2 parse

Create and parse the L<JSON::XS> object.

=head1 INHERITED METHODS

=over 4

=item L<EntityModel::Definition>

L<add_entity_t
Devel-SizeMe ( T/TI/TIMB/Devel-SizeMe-0.19.tar.gz, TIMB, 2013; MetaCPAN )
Devel-SizeMe/bin/sizeme_store.pl ( view source; MetaCPAN )
ent.

use strict;
use warnings;
use autodie;

use DBI qw(looks_like_number);
use DBD::SQLite;
use JSON::XS;
use Devel::Dwarn;
use Data::Dumper;
use Getopt::Long;
use Carp qw(carp croak confess);

use 
y $opt_open,
) or exit 1;

$| = 1; #if $opt_debug;
my $run_size = 0;
my $total_size = 0;

my $j = JSON::XS->new->ascii->pretty(0);

my ($dbh, $node_ins_sth);
if ($opt_db) {
    $dbh = DBI->connect("db
for (@outputs);

    # output
    # ...
    if ($dbh) {
        my $attr_json = $j->encode($x->{attr});
        my $leaves_json = $j->encode($x->{leaves});
        $node_ins_sth->execute(
            
Log-Structured ( F/FR/FREW/Log-Structured-0.001003.tar.gz, FREW, 2013; MetaCPAN )
Log-Structured/lib/Log/Structured.pm ( view source; MetaCPAN )
->{category}] $e->{message}"
   }, sub {
      open my $fh, '>>', 'log';
      print {$fh} encode_json($_[1]) . "\n";
   }],
 });

 $structured_log->log_event({ message => 'Starting web server' });

 
n $formatter->sprintf($_[1])
   }, sub {
      open my $fh, '>>', 'log';
      print {$fh} encode_json($_[1]) . "\n";
   }],
 });

=head1 AUTHOR

Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>

=h
Tropo ( R/RE/RENEEB/Tropo-0.16.tar.gz, RENEEB, 2013; MetaCPAN )
Tropo/lib/Tropo.pm ( view source; MetaCPAN )
ict;
use warnings;

use Moo;
use Types::Standard qw(ArrayRef);
use Path::Tiny;
use JSON;

use overload '""' => \&json;

our $VERSION = 0.16;

has objects => (
    is      => 'rw',
    isa     => Array
 tropo => \@objects,
    };
    
    return $data;
}

sub json {
    my ($self) = @_;
    
    my $data   = $self->perl;
    my $string = JSON->new->encode( $data );
    
    return $string;
}

sub ad
  to => $clients_phone_number,
  );
  $tropo->say( 'hello ' . $client_name );
  $tropo->json;

Creates this JSON output:

  {
      "tropo":[
          {
              "call": {
                      
Bing-Translate ( T/TA/TAIWOLF/Bing-Translate-0.003.tar.gz, TAIWOLF, 2013; MetaCPAN )
Bing-Translate/lib/Bing/Translate.pm ( view source; MetaCPAN )
8)');

# for translate
use LWP::UserAgent;
use HTTP::Headers;
use URI::Escape;
# for getToken
use JSON;
use Data::Dumper;
use HTTP::Request::Common qw(POST);

#http://stackoverflow.com/questions/39213
elf, $class;
        return $self;
}

sub decodeJSON {
        my $rawJSON = shift;
        my $json = new JSON;
        my $obj = $json->decode($rawJSON);
        #print "The structure of obj: ".Dump
;
                $content = $response->decoded_content;
                my $accessToken = &decodeJSON($content);
                $authToken = "Bearer" . " " . "$accessToken";
        } else {
       
WWW-TheMovieDB ( P/PJ/PJOBSON/WWW-TheMovieDB-0.05.tar.gz, PJOBSON, 2013; MetaCPAN )
WWW-TheMovieDB/lib/WWW/TheMovieDB.pm ( view source; MetaCPAN )
000;
use strict;
use warnings;
use HTTP::Request;
use LWP::UserAgent;
use URI::Escape;
use JSON qw(encode_json);

our $VERSION = '0.05';
our $EMPTY = q{};
our $SL = q{/};
our $AM = q{&};
our $EQ = q{=
>{'version'}          || '3';
	$package->{'type'}             = $params->{'type'}             || 'json';
	$package->{'uri'}              = $params->{'uri'}              || 'http://api.themoviedb.org';
y $params = shift;

	my $url = $params->{'url'};
	my $method = $params->{'method'};
	my $json = $params->{'json'} || $EMPTY;

	my $ua = LWP::UserAgent->new;
	   $ua->agent("WWW::TheMovieDB/". $VERSION
Tropo ( R/RE/RENEEB/Tropo-0.16.tar.gz, RENEEB, 2013; MetaCPAN )
Tropo/lib/Tropo/WebAPI/Call.pm ( view source; MetaCPAN )
   => Str,
    required => 1,
);

has from => (
    is  => 'ro',
    isa => Str,
    exclude_from_json => 1,
);

has ['network', 'channel'] => (
    is  => 'ro',
    isa => Str,
);

has 'answer_on_med

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