Group
Extension

Matches 35359

Storable-AMF ( G/GR/GRIAN/Storable-AMF-1.23.tar.gz, GRIAN, 2016; MetaCPAN )
Storable-AMF/lib/Storable/AMF0.pm ( view source; MetaCPAN )
er 'import';
use Carp qw(croak);
{   our @Bool = (bless( do{\(my $o = 0)},'JSON::PP::Boolean'), bless( do{\(my $o = 1)},'JSON::PP::Boolean')); 
    local $@; 
    eval { 
	require Types::Serialiser; 
ialiser::false(), Types::Serialiser::true());
	1
    } or 
    eval {
	require JSON::XS;
	@Bool = (JSON::XS::false(), JSON::XS::true());
	1
    }; 
};

# Items to export into callers namespace by defa


  # JSON::XS boolean support
  
  use JSON::XS;

  $json =  encode_json( thaw( $amf0, parse_serializator_option( 'json_boolean' ))); #  

  $amf_with_boolean = freeze( $JSON::XS::true  or $JSON::XS:
Flickr-API2 ( T/TJ/TJC/Flickr-API2-2.50.tar.gz, TJC, 2016; MetaCPAN )
Flickr-API2/lib/Flickr/API2/Request.pm ( view source; MetaCPAN )
ces/rest/';

    bless $self, $class;

    $self->{api_args}->{format}         = 'json';
    $self->{api_args}->{nojsoncallback} = 1;

    $self->method('POST');
    $self->uri( $self->{rest_uri} );

Language-Expr ( P/PE/PERLANCAR/Language-Expr-0.29.tar.gz, PERLANCAR, 2016; MetaCPAN )
Language-Expr/lib/Language/Expr/JS.pm ( view source; MetaCPAN )
shift;
    $str =~ s!^!// !g;
    $str;
}

sub eval_expr_js {
    require File::Temp;
    require JSON::MaybeXS;
    require Language::Expr::Compiler::js;
    require Nodejs::Util;

    my ($expr, $op
@_;
    $opts //= {};

    state $default_jsc = Language::Expr::Compiler::js->new;

    state $json = JSON::MaybeXS->new->allow_nonref;

    my $jsc = $opts->{js_compiler} // $default_jsc;

    # code
lare vars\n") . join("", map { "let $_ = ".$json->encode($opts->{vars}{$_}).";\n" } sort keys %{$opts->{vars}})
             : ""),
        "console.log(JSON.stringify(",
        $jsc->compile($expr),
Language-Expr ( P/PE/PERLANCAR/Language-Expr-0.29.tar.gz, PERLANCAR, 2016; MetaCPAN )
Language-Expr/lib/Language/Expr/Compiler/js.pm ( view source; MetaCPAN )
ported since JavaScript 1.6], 'let' lexical variables
[supported since JavaScript 1.7] and native JSON [supported since JavaScript
1.8.1]).

To test emitted JavaScript code, we use Node.js.

=item * J
Dancer2-Plugin-SendAs ( R/RU/RUSSELLJ/Dancer2-Plugin-SendAs-0.002.tar.gz, RUSSELLJ, 2016; MetaCPAN )
Dancer2-Plugin-SendAs/lib/Dancer2/Plugin/SendAs.pm ( view source; MetaCPAN )
  get '/html' => sub {
        send_as html => template 'foo';
    };

    get '/json/**' => sub {
        send_as json => splat;
    };

=head1 DESCRIPTION

This plugin is DEPRECATED. The C<send_as> 
Storable-AMF ( G/GR/GRIAN/Storable-AMF-1.23.tar.gz, GRIAN, 2016; MetaCPAN )
Storable-AMF/AMF.xs ( view source; MetaCPAN )
#define OPT_RAISE_ERROR   8
#define OPT_MILLSEC_DATE  16
#define OPT_PREFER_NUMBER 32
#define OPT_JSON_BOOLEAN  64
#define OPT_MAPPER        128
#define OPT_TARG          256
#define OPT_SKIP_BAD     
' ){
                if ( sv_isa(one, "JSON::PP::Boolean")){
                    is_perl_bool =  1;
                }
                else if ( sv_isa(one, "JSON::XS::Boolean") ){
                    
_ struct io_struct *io, bool value){
    AV *Bool;
    SV *sv;
    if (  0 == ( io->options & OPT_JSON_BOOLEAN ) ){
	sv = boolSV( value );
	/* SvREFCNT_inc_simple_void_NN( sv ); */
	return sv;
    } 
Rethinkdb ( N/NJ/NJLG/Rethinkdb-0.14.tar.gz, NJLG, 2016; MetaCPAN )
Rethinkdb/lib/Rethinkdb/Query/Table.pm ( view source; MetaCPAN )
 _parent => $self,
    _type   => $self->_termType->insert,
    args    => Rethinkdb::Util->_expr_json($args),
    optargs => $params,
  );

  return $q;
}

sub sync {
  my $self = shift;

  my $q = R
st')->table('dc_universe')->create->run;

Create this table. A RethinkDB table is a collection of JSON documents.

If successful, the operation returns an object: C<< {created => 1} >>. If a
table wit
Rethinkdb ( N/NJ/NJLG/Rethinkdb-0.14.tar.gz, NJLG, 2016; MetaCPAN )
Rethinkdb/lib/Rethinkdb/Query/Database.pm ( view source; MetaCPAN )
('test')->table_create('dc_universe')->run;

Create a table. A RethinkDB table is a collection of JSON documents.

If successful, the operation returns an object: C<< {created => 1} >>. If a
table wit
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Role/Store.pm ( view source; MetaCPAN )
= '0.005004';
use Defaults::Modern;

use JSON::MaybeXS 1.001 ();

use Role::Tiny;

requires 'TO_JSON';

method save ( (Str | Path) $path ) {
  my $jseng = JSON::MaybeXS->new(
    utf8            => 1,
 1,
  );

  my $json  = $jseng->encode($self)
    || confess "Could not encode JSON: ".$jseng->error;

  path($path)->spew_utf8($json)
}

method load ( (Str | Path) $path ) {
  my $json  = path($path)
->slurp_utf8;
  my $jseng = JSON::MaybeXS->new(
    utf8      => 1,
    relaxed   => 1,
  );

  my $data  = $jseng->decode($json)
    || confess "Could not decode JSON: ".$jseng->error;

  $self->_loa
Parse-CPAN-Meta ( D/DA/DAGOLDEN/Parse-CPAN-Meta-1.4422.tar.gz, DAGOLDEN, 2016; MetaCPAN )
Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm ( view source; MetaCPAN )
use 5.008001;
use strict;
package Parse::CPAN::Meta;
# ABSTRACT: Parse META.yml and META.json CPAN metadata files

our $VERSION = '1.4422';

use Exporter;
use Carp 'croak';

our @ISA = qw/Exporter/;
o
($meta);
  }
  elsif ($filename =~ /\.json$/) {
    return $class->load_json_string($meta);
  }
  else {
    $class->load_string($meta); # try to detect yaml/json
  }
}

sub load_string {
  my ($class
lass->load_yaml_string($string);
  }
  elsif ( $string =~ /^\s*\{/ ) { # looks like JSON
    return $class->load_json_string($string);
  }
  else { # maybe doc-marker-free YAML
    return $class->load
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Role/UI/Cmd.pm ( view source; MetaCPAN )
calc::Cmd::Result->new(%params)
}

method munge_recipe (%params) {
  my $data = $self->recipe->TO_JSON;
  $data->{$_} = $params{$_} for keys %params;
  App::vaporcalc::Recipe->new(%$data)
}

1;

=pod
y $new_recipe = $self->munge_recipe( 
    target_vg => 50, 
    target_pg => 50 
  );

Calls C<TO_JSON> on the current L</recipe> object, merges in the
given key/value pairs, and returns a new L<App::
boolean ( I/IN/INGY/boolean-0.46.tar.gz, INGY, 2016; MetaCPAN )
boolean/lib/boolean.pm ( view source; MetaCPAN )
0 } = $false;
    ${ \ !!1 } = $true;
    # make true and false read-only again
    &Internals::SvREADONLY( \ !!0, 1);
    &Internals::SvREADONLY( \ !!1, 1);
}

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

1;
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Flavor.pm ( view source; MetaCPAN )
d TO_JSON {
  +{
    percentage => $self->percentage,
    tag        => $self->tag,
    type       => $self->type,
  }
}

with 'App::vaporcalc::Role::Store';

1;

=pod

=for Pod::Coverage TO_JSON

=he
API-PureStorage ( B/BE/BENNIE/API-PureStorage-0.03.tar.gz, BENNIE, 2016; MetaCPAN )
API-PureStorage/lib/API/PureStorage.pm ( view source; MetaCPAN )
package API::PureStorage;

use Data::Dumper;
use REST::Client;
use JSON;
use Net::SSL;

use warnings;
use strict;

$API::PureStorage::VERSION = '0.03';

our %ENV;
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 
 $client->setHost('https://'.$self->{host});

    $client->addHeader('Content-Type', 'application/json');

    $client->getUseragent()->cookie_jar({ file => $self->{cookie_file} });
    $client->getUs
_json($con)), "\n" if $debug;
    return from_json($con);
}

sub _api_post {
    my $self = shift @_;
    my $url = shift @_;
    my $data = shift @_;
    my $ret = $self->{client}->POST($url, to_json
boolean ( I/IN/INGY/boolean-0.46.tar.gz, INGY, 2016; MetaCPAN )
boolean/lib/boolean.pod ( view source; MetaCPAN )
ber, Null and Boolean. Perl lacks native
Boolean support.

Data interchange modules like YAML and JSON can now C<use boolean> to
encodeI<decode>roundtrip Boolean values.

=head1 FUNCTIONS

This module
ecated.

=head1 JSON SUPPORT

JSON::MaybeXS (or less preferably JSON.pm ) will encode Perl data with
boolean.pm values correctly if you use the C<convert_blessed> option:

    use JSON::MaybeXS;
    u
se boolean -truth;
    my $json = JSON::MaybeXS->new->convert_blessed;
    say $json->encode({false => (0 == 1)});     # Says: '{"false":false}',

=head1 AUTHOR

Ingy döt Net <ingy@cpan.org>

=head1 
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/Recipe.pm ( view source; MetaCPAN )
  }
  }

  \%params
}

method TO_JSON {
  +{
    map {; 
      my ($attr, $val) = ($_, $self->$_);
      my $raw = blessed $val && $val->can('TO_JSON') ? $val->TO_JSON : $val;
      $attr => $raw
    
ole::Calc',
     'App::vaporcalc::Role::Store' ;

1;

=pod

=for Pod::Coverage BUILD BUILDARGS TO_JSON

=head1 NAME

App::vaporcalc::Recipe - An e-liquid recipe

=head1 SYNOPSIS

  use App::vaporcalc:
Rethinkdb ( N/NJ/NJLG/Rethinkdb-0.14.tar.gz, NJLG, 2016; MetaCPAN )
Rethinkdb/lib/Rethinkdb.pm ( view source; MetaCPAN )
>{_rdb};
  return $q;
}

sub json {
  my $self  = shift;
  my $value = shift;

  my $q = Rethinkdb::Query->new(
    _rdb  => $self,
    _type => $self->term->termType->json,
    args  => $value,
  );
optargs,
  );

  return $q;
}

sub geojson {
  my $self = shift;
  my $args = shift;

  my $q = Rethinkdb::Query->new(
    _type => $self->term->termType->geojson,
    args  => $args,
  );

  return $
t error.

=head2 expr

  r->expr({a => 'b'})->merge({b => [1,2,3]})->run($conn);

Construct a RQL JSON object from a native object.

=head2 js

  r->js("'str1' + 'str2'")->run($conn);
  r->table('marv
App-vaporcalc ( A/AV/AVENJ/App-vaporcalc-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
App-vaporcalc/lib/App/vaporcalc/RecipeResultSet.pm ( view source; MetaCPAN )
sub { shift->recipe->calc },
);

method TO_JSON {
  +{ recipe => $self->recipe }
}

with 'App::vaporcalc::Role::Store';

1;

=pod

=for Pod::Coverage TO_JSON

=head1 NAME

App::vaporcalc::RecipeResult
Rethinkdb ( N/NJ/NJLG/Rethinkdb-0.14.tar.gz, NJLG, 2016; MetaCPAN )
Rethinkdb/lib/Rethinkdb/Query.pm ( view source; MetaCPAN )
ill,
  );

  return $q;
}

sub to_geojson {
  my $self = shift;

  my $q = Rethinkdb::Query->new(
    _parent => $self,
    _type   => $self->_termType->to_geojson,
  );

  return $q;
}

sub includes 
a single JSON result, or a cursor,
depending on the query.

=head2 update

  r->table('posts')->get(1)->update({status => 'published'})->run;

Update JSON documents in a table. Accepts a JSON document
 => 'Aleas jacta est',
    status  => 'draft'
  })->run;

Replace documents in a table. Accepts a JSON document or a ReQL expression, and
replaces the original document with the new one. The new docum
Rethinkdb ( N/NJ/NJLG/Rethinkdb-0.14.tar.gz, NJLG, 2016; MetaCPAN )
Rethinkdb/lib/Rethinkdb/Response.pm ( view source; MetaCPAN )
package Rethinkdb::Response;
use Rethinkdb::Base -base;

use JSON::PP;
use Rethinkdb::Protocol;

has [qw{ type type_description response token error_type backtrace profile }];

sub _init {
  my $class

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