Group
Extension

Matches 35358

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
SocketIO-Emitter ( T/TO/TORITSUYO/SocketIO-Emitter-0.04.tar.gz, TORITSUYO, 2016; MetaCPAN )
SocketIO-Emitter/lib/SocketIO/Emitter.pm ( view source; MetaCPAN )
is);
     # prefix
     $self->prefix($self->key ? $self->key : 'socket.io');
}

sub json      { $_[0]->flags->{json}      = 1; $_[0]; }
sub volatile  { $_[0]->flags->{volatile}  = 1; $_[0]; }
sub bro
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:
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/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::
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
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;
InfluxDB ( H/HI/HIROSE/InfluxDB-1.005.tar.gz, HIROSE, 2016; MetaCPAN )
InfluxDB/lib/InfluxDB.pm ( view source; MetaCPAN )
ame database ssl json)],
);

use Carp;
use Data::Validator;
use Mouse::Util::TypeConstraints;
use Furl;
use URI::Escape;
use JSON 2;

enum 'TimePrecision' => qw(s m u);

subtype 'JSONBool' => as 'Scal
rRef';
coerce 'JSONBool'
    => from 'Bool' => via { $_ ? \1 : \0 }
    => from 'Object' => via { JSON::is_bool($_) ? ($_ == 1 ? \1 : \0) : \0 }
;

sub new {
    state $rule = Data::Validator->new(
  
oin('/', __PACKAGE__, $VERSION),
            timeout => $args->{timeout},
        ),
        json   => JSON->new,
        status => {},
        %$args
    }, $class;

    return $self;
}

sub debugf {
Rethinkdb ( N/NJ/NJLG/Rethinkdb-0.14.tar.gz, NJLG, 2016; MetaCPAN )
Rethinkdb/lib/Rethinkdb/Util.pm ( view source; MetaCPAN )
package Rethinkdb::Util;
use Rethinkdb::Base -base;

use Scalar::Util 'blessed';
use JSON::PP 'encode_json';
use Carp 'croak';

use Rethinkdb::Query::Datum;
use Rethinkdb::Protocol;

my $PROTOCOL = Re
 mostly JSON
sub _expr_json {
  my $self  = shift;
  my $value = shift;

  if ( blessed($value) && $value->can('_build') ) {
    return $value;
  }

  my $retval;
  eval { $retval = encode_json $value
 ( !$@ && $retval ) {
    return Rethinkdb::Query->new(
      _type => $PROTOCOL->term->termType->json,
      args  => $retval
    );
  }
  elsif ( ref $value eq 'ARRAY' ) {
    return $self->_make_ar
Web-Machine ( D/DR/DROLSKY/Web-Machine-0.17.tar.gz, DROLSKY, 2016; MetaCPAN )
Web-Machine/lib/Web/Machine/Resource.pm ( view source; MetaCPAN )
    package HelloWorld::Resource;
        use strict;
        use warnings;
        use JSON::XS qw[ encode_json ];

        use parent 'Web::Machine::Resource';

        sub init {
            my $se
  $self->{json}
                = exists $args->{json}
                ? $args->{json}
                : {};
        }

        sub content_types_provided { [ { 'application/json' => 'to_json' } ] }

        sub to_json {
            my $self = shift;

            encode_json( $self->{json} );
        }
    }

    Web::Machine->new(
        resource      => 'HelloWorld::Resource',
        resource
WWW-PSN ( Z/ZS/ZSHENGLI/WWW-PSN-0.02.tar.gz, ZSHENGLI, 2016; MetaCPAN )
WWW-PSN/lib/WWW/PSN.pm ( view source; MetaCPAN )
Exporter 'import';
@EXPORT = qw/profile trophies/;

use strict;
use warnings;
use HTTP::Tiny;
use JSON;

use constant ORIGIN            => 'https://www.playstation.com';
use constant IO               
url<. :(\n" unless $response->{success};
    my $json_data = $response->{content};
    $json_data =~ s/^\s+|\s+$//g;
    return JSON::decode_json($json_data);
}

1;

=pod

=encoding UTF-8

=head1 NAME
POEx-Weather-OpenWeatherMap ( A/AV/AVENJ/POEx-Weather-OpenWeatherMap-0.003002.tar.gz, AVENJ, 2016; MetaCPAN )
POEx-Weather-OpenWeatherMap/lib/POEx/Weather/OpenWeatherMap.pm ( view source; MetaCPAN )
onse = Weather::OpenWeatherMap::Result->new_for(
    $type =>
      request => $my_request,
      json    => $content,
  );
  
  unless ($my_response->is_success) {
    my $code = $my_response->respon
CPAN-Flatten ( S/SK/SKAJI/CPAN-Flatten-0.01.tar.gz, SKAJI, 2016; MetaCPAN )
CPAN-Flatten/lib/CPAN/Flatten.pm ( view source; MetaCPAN )
::More (0.88) -> core
      IO::Socket (0) -> core
      Socket (1.97) -> core
    JSON::PP (2.27103) -> MAKAMAKA/JSON-PP-2.27400
      ExtUtils::MakeMaker (0) -> core
      ExtUtils::MakeMaker (0) ->
    P/PE/PEVANS/IO-Socket-IP-0.37.tar.gz
    M/MA/MAKAMAKA/JSON-PP-2.27400.tar.gz
  P/PE/PEVANS/IO-Socket-IP-0.37.tar.gz
  M/MA/MAKAMAKA/JSON-PP-2.27400.tar.gz

=head1 DESCRIPTION

This is experimenta
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
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:
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;
    } 
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
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
Text-ZPL ( A/AV/AVENJ/Text-ZPL-0.003001.tar.gz, AVENJ, 2016; MetaCPAN )
Text-ZPL/bench/vs_json_pp.pl ( view source; MetaCPAN )
use strict; use warnings;
use Benchmark 'cmpthese';

use JSON::Tiny ();
use JSON::PP 'encode_json', 'decode_json';
use Text::ZPL;

my $struct = +{
  foo => 'bar',
  bar => 'baz',
  hash => +{
    x =>
[ 1 .. 100 ],
  },
};

my $tiny = JSON::Tiny->new;

my ($js, $tjs, $zpl);
cmpthese( 2_000, +{
  encode_jsonpp => sub {
    $js = encode_json $struct
  },
  encode_jsontiny => sub {
    $tjs = $tiny->e
b {
    $zpl = encode_zpl $struct
  },
});

cmpthese( 2_000, +{
  decode_jsonpp => sub {
    decode_json $js
  },
  decode_jsontiny => sub {
    $tiny->decode($tjs)
  },
  decode_zpl => sub {
    deco
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

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