Group
Extension

Matches 35358

App-Pods2Site ( K/KN/KNTH/App-Pods2Site-1.003.tar.gz, KNTH, 2019; MetaCPAN )
App-Pods2Site/lib/App/Pods2Site/Util.pm ( view source; MetaCPAN )
		readUTF8File
			expandAts
		);

use JSON;
use File::Basename;

my $FILE_SEP = $IS_WINDOWS ? '\\' : '/';
my $DATAFILE = '.pods2site';
my $JSON = JSON->new()->utf8()->pretty()->canonical();
AFILE");
	open (my $fh, '> :raw :bytes', $df) or die("Failed to open '$df': $!\n");
	print $fh $JSON->encode($allData);
	close($fh);  
}

sub readData
{
	my $dir = shift;
	my $section = shift
o read from '$df': $!\n") unless ($szRead && $szRead == $szExpected); 
		close($fh);
		$data = $JSON->decode($buf);
		$data = $data->{$section} if $section;
	}

	return $data;
}

sub createSp
jQuery-File-Upload ( S/SR/SRCHULO/jQuery-File-Upload-0.32.tar.gz, SRCHULO, 2019; MetaCPAN )
jQuery-File-Upload/lib/jQuery/File/Upload.pm ( view source; MetaCPAN )
ckage jQuery::File::Upload;

use 5.008008;
use strict;
#use warnings;

use CGI;
use JSON::XS;
use JSON;
use Net::SSH2;
use Net::SSH2::SFTP;
use Image::Magick;
use Cwd 'abs_path';
use URI;
stion
  		if ($self->ctx->req->headers->header('Accept') =~ qr(application/json) ) {
	  		$content_type = 'application/json';
  		}

		$self->ctx->stash->{current_view} = '';
		$self->ctx->res->
	}

	#they should provide image=y or image=n if image
	my $json = JSON::XS->new->ascii->pretty->allow_nonref;
	$self->{output} = $json->encode({files => \@arr});
}

sub _no_ext {
	my $self = s
Bencher-Scenarios-DataCleansing ( P/PE/PERLANCAR/Bencher-Scenarios-DataCleansing-0.005.tar.gz, PERLANCAR, 2019; MetaCPAN )
Bencher-Scenarios-DataCleansing/lib/Bencher/Scenario/DataCleansing/Startup.pm ( view source; MetaCPAN )
       {module=>'Data::Clean::ForJSON'},

        {module=>'JSON::MaybeXS'},
        {module=>'JSON::PP'},
        {module=>'JSON::XS'},
        {module=>'Cpanel::JSON::XS'},

        {module=>'Data::
L<Cpanel::JSON::XS> 3.0239

L<Data::Abridge> 0.03.01

L<Data::Clean> 0.505

L<Data::Clean::ForJSON> 0.394

L<Data::Rmap> 0.65

L<Data::Tersify> 0.001

L<Data::Visitor::Callback> 0.30

L<JSON::MaybeXS>


L<JSON::PP> 2.27400_02

L<JSON::XS> 3.04

=head1 BENCHMARK PARTICIPANTS

=over

=item * Data::Clean (perl_code)

L<Data::Clean>



=item * Data::Clean::ForJSON (perl_code)

L<Data::Clean::ForJSON>

Bencher-Scenarios-DataCleansing ( P/PE/PERLANCAR/Bencher-Scenarios-DataCleansing-0.005.tar.gz, PERLANCAR, 2019; MetaCPAN )
Bencher-Scenarios-DataCleansing/lib/Bencher/ScenarioR/DataCleansing/Object.pm ( view source; MetaCPAN )
ON

our $results = [[200,"OK",[{dataset=>"ary10k-u1-obj",errors=>2.5e-06,p_tags=>"",participant=>"JSON::PP",rate=>156,samples=>23,time=>6.39,vs_slowest=>1},{dataset=>"ary10k-u10k-obj",errors=>5.8e-05,
time=>4.62,vs_slowest=>1.38},{dataset=>"ary10k-u10k-obj",errors=>1.3e-06,p_tags=>"",participant=>"JSON::PP",rate=>227,samples=>22,time=>4.41,vs_slowest=>1.45},{dataset=>"ary10k-u1-obj",errors=>2.3e-06
0,time=>1.02,vs_slowest=>6.24},{dataset=>"ary100-u1-obj",errors=>1.3e-06,p_tags=>"",participant=>"JSON::PP",rate=>1500,samples=>20,time=>0.67,vs_slowest=>9.5},{dataset=>"ary100-u100-obj",errors=>6.1e-
Bencher-Scenarios-DataCleansing ( P/PE/PERLANCAR/Bencher-Scenarios-DataCleansing-0.005.tar.gz, PERLANCAR, 2019; MetaCPAN )
Bencher-Scenarios-DataCleansing/lib/Bencher/Scenario/DataCleansing/Object.pm ( view source; MetaCPAN )
           name => 'JSON::PP',
            module => 'JSON::PP',
            code_template => 'state $json = JSON::PP->new->allow_blessed(1)->convert_blessed(1); $json->decode($json->encode(<data>))',
en running the sample benchmark.

L<Acme::Damn> 0.08

L<Data::Clean> 0.505

L<Data::Rmap> 0.65

L<JSON::PP> 2.27400_02

L<Scalar::Util> 1.5

=head1 BENCHMARK PARTICIPANTS

=over

=item * Data::Clean-i
l->clone_and_clean(<data>)



=item * JSON::PP (perl_code)

Code template:

 state $json = JSON::PP->new->allow_blessed(1)->convert_blessed(1); $json->decode($json->encode(<data>))



=item * Data::Rm
MongoHosting ( O/OV/OVNTATAR/MongoHosting.tar.gz, OVNTATAR, 2019; MetaCPAN )
MongoHosting/lib/MongoHosting/ReplicaSet/Shard.pm ( view source; MetaCPAN )
s::Run;
use Rex::Commands::Service;
use namespace::clean;
use Rex::Resource::firewall;
use JSON qw(decode_json);

has is_arbiter => (is => 'ro', init_arg => 'arbiter', default => sub {0});

sub init {
al',
    'var s = rs.status(); printjson([s.ok, s.set])'
    ];

  return if $?;
  my $json = eval { decode_json($out) } or warn $@, return;
  my ($ok, $rs) = @$json;

  return 1 if $ok && defined $rs
: <%= ($index++) %>, host: "<%= $host->dsn %>" },
    <% } %>
    ]
  }
);
sleep(10000);
<% if($c->is_primary) { %>
rs.addArb("<%= $c->parent->arbiter->dsn %>");
<% } %>

printjson(rs.status());
@end
Facebook-OpenGraph ( O/OK/OKLAHOMER/Facebook-OpenGraph-1.31.tar.gz, OKLAHOMER, 2019; MetaCPAN )
Facebook-OpenGraph/lib/Facebook/OpenGraph/Response.pm ( view source; MetaCPAN )
001;

use Carp qw(croak);
use JSON 2 ();

sub new {
    my $class = shift;
    my $args  = shift || +{};

    return bless +{
        json        => $args->{json} || JSON->new->utf8,
        headers  
ub req_headers { shift->{req_headers}  }
sub req_content { shift->{req_content}  }
sub json        { shift->{json}         }
sub etag        { shift->header('etag') }

sub api_version {
    my $self =
     $error->{error_user_msg} || '-',
                   );
    }

    return $err_str;
}

sub as_json {
    my $self = shift;

    my $content = $self->content;
    if ($content =~ m{\A (true|false) 
Do ( A/AW/AWNCORP/Do-1.88.tar.gz, AWNCORP, 2019; MetaCPAN )
Do/lib/Data/Object/Boolean.pm ( view source; MetaCPAN )
TrueType ? $True : $False
}

sub IsFalse {
  Type($_[0]) eq $FalseType ? $True : $False
}

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

1;

=encoding utf8

=head1 NAME

Data::Object::Boolean

=cut

=head1 AB
2 to_json

  TO_JSON(Any $arg) : Ref['SCALAR']

The TO_JSON function returns a scalar ref representing truthiness or falsiness
based on the arguments passed. This function is commonly used by JSON enc
w they should represent the value.

=over 4

=item TO_JSON example

  Data::Object::Boolean::TO_JSON($true); # \1
  Data::Object::Boolean::TO_JSON($false); # \0

=back

=cut

=head2 true

  True() : O
Facebook-OpenGraph ( O/OK/OKLAHOMER/Facebook-OpenGraph-1.31.tar.gz, OKLAHOMER, 2019; MetaCPAN )
Facebook-OpenGraph/lib/Facebook/OpenGraph.pm ( view source; MetaCPAN )
h::Response;
use HTTP::Request::Common;
use URI;
use Furl::HTTP;
use Data::Recursive::Encode;
use JSON 2 ();
use Carp qw(croak);
use Digest::SHA qw(hmac_sha256 hmac_sha256_hex);
use MIME::Base64::URLS
h_limit} || 50,
        is_beta             => $args->{is_beta} || 0,
        json                => $args->{json} || JSON->new->utf8,
        use_appsecret_proof => $args->{use_appsecret_proof} || 0,
atch_limit}         }
sub is_beta             { shift->{is_beta}             }
sub json                { shift->{json}                }
sub use_appsecret_proof { shift->{use_appsecret_proof} }
sub use
MongoHosting ( O/OV/OVNTATAR/MongoHosting.tar.gz, OVNTATAR, 2019; MetaCPAN )
MongoHosting/lib/MongoHosting/ReplicaSet/Config.pm ( view source; MetaCPAN )
Service;
use Rex::Commands::Pkg;
use Rex::Commands::Host;
use Rex::Resource::firewall;
use JSON qw(decode_json);

sub init {
  my $self = shift;

  return unless $self->is_primary;
  return if $self->
--eval',
    'var s = rs.status(); printjson([s.ok, s.set])'
    ];

  return if $?;
  my $json = eval { decode_json($out) } or return;
  my ($ok, $rs) = @$json;
  return 1 if $ok && defined $rs && $r

    configsvr: true,
    members: [
    <% foreach my $host (@{$c->siblings}) { %>
      { _id : <%= ($index++) %>, host: "<%= $host->dsn %>" },
    <% } %>
    ]
  }
)

printjson(rs.status());
@end
Data-Clean-FromJSON-Pregen ( P/PE/PERLANCAR/Data-Clean-FromJSON-Pregen-0.001.tar.gz, PERLANCAR, 2019; MetaCPAN )
Data-Clean-FromJSON-Pregen/lib/Data/Clean/FromJSON/Pregen.pm ( view source; MetaCPAN )
package Data::Clean::FromJSON::Pregen;

our $DATE = '2019-09-08'; # DATE
our $VERSION = '0.001'; # VERSION

use 5.010001;
use strict;
use warnings;

use Exporter qw(import);
our @EXPORT_OK = qw(
     
                  clean_from_json_in_place
                       clone_and_clean_from_json
               );

sub _clone {
    if (eval { require Data::Clone; 1 }) {
        Data::Clone::clone(@_);
 
lone(@_);
    }
}

 # generated with Data::Clean version 0.505, Data::Clean::FromJSON version 0.394
 sub clean_from_json_in_place { 
 my $data = shift;
 state $process_array;
 state $process_hash;
 if
Net-DHCP-Windows-Netsh-Parse ( V/VV/VVELOX/Net-DHCP-Windows-Netsh-Parse-0.1.0.tar.gz, VVELOX, 2019; MetaCPAN )
Net-DHCP-Windows-Netsh-Parse/lib/Net/DHCP/Windows/Netsh/Parse.pm ( view source; MetaCPAN )
package Net::DHCP::Windows::Netsh::Parse;

use 5.006;
use strict;
use warnings;
use JSON;

=head1 NAME

Net::DHCP::Windows::Netsh::Parse - Parses the output from 'netsh dhcp server dump'

=head1 VERSI
ith... ".$@."\n";
    }
    
    # no white space
    my $json=$parser->json(0);
    
    # now with useful white space
    $json=$parser->json(0);

=head1 METHODS

=head2 new

This initiates the obje
}

=head2 json

This returns the parsed data as JSON.

One option is taken and that is either a 0/1 for
if it should be made nice and pretty.

    # no white space
    my $json=$parser->json(0);
    
Bencher-Scenarios-DataCleansing ( P/PE/PERLANCAR/Bencher-Scenarios-DataCleansing-0.005.tar.gz, PERLANCAR, 2019; MetaCPAN )
Bencher-Scenarios-DataCleansing/lib/Bencher/ScenarioR/DataCleansing/Startup.pm ( view source; MetaCPAN )
.5e-05,mod_overhead_time=>20.1,participant=>"JSON::PP",samples=>22,time=>28.8,vs_slowest=>6.75},{errors=>1.7e-05,mod_overhead_time=>12.3,participant=>"JSON::MaybeXS",samples=>20,time=>21,vs_slowest=>9
.7e-05,mod_overhead_time=>7.3,participant=>"JSON::XS",samples=>20,time=>16,vs_slowest=>12},{errors=>1.7e-05,mod_overhead_time=>6.3,participant=>"Cpanel::JSON::XS",samples=>20,time=>15,vs_slowest=>13},
{errors=>3.8e-05,mod_overhead_time=>6.3,participant=>"Data::Clean::ForJSON",samples=>20,time=>15,vs_slowest=>13},{errors=>3.4e-05,mod_overhead_time=>4.3,participant=>"Data::Clean",samples=>20,time=>13
WWW-Deduce-Ingest ( D/DE/DEDUCE/WWW-Deduce-Ingest-1.1.tar.gz, DEDUCE, 2019; MetaCPAN )
WWW-Deduce-Ingest/Ingest.pm ( view source; MetaCPAN )
 Created: 2019-Jul-22 16:07 (EDT)
# Function: Deduce Ingest API

package WWW::Deduce::Ingest;
use JSON;
use LWP::UserAgent;
use LWP::Protocol::https;
use HTTP::Request;
use Digest::SHA 'sha1_hex', 'sh
opts  = shift;

    my $data = { site => $me->{site}, vers => $VERHASH };
    $data->{testmode} = JSON::true if $opts->{testmode} || $me->{testmode};

    if( email_valid($email) ){
        $email = t
collect_url};
        }
    }

    my $json = to_json($data, {utf8 => 1, pretty => 1});

    my $html = <<EOS;
<script type="text/javascript">
var dd_info = $json
</script>
<script type="text/javascri
RDF-LDF ( H/HO/HOCHSTEN/RDF-LDF-0.25.tar.gz, HOCHSTEN, 2019; MetaCPAN )
RDF-LDF/lib/RDF/LDF.pm ( view source; MetaCPAN )
::UserAgent;
use HTTP::Request::Common;
use Log::Any ();
use Cache::LRU;
use Clone qw(clone);
use JSON;
use URI::Template;
use RDF::LDF::Error;

our $VERSION = '0.25';

has url => (
    is => 'ro' ,
 
fo("fetching: $url");

    my $model = RDF::Trine::Model->temporary_model;

    # JSON support in RDF::Trine isn't JSON-LD
    # Set the accept header quality parameter at a minimum for this format
  
pplication/x-turtle;q=1.0,application/rdf+xml;q=0.9,text/x-nquads;q=0.9,application/json;q=0.1,application/x-rdf+json;q=0.1');

    eval {
        # Need to explicitly set the useragent to keep the ac
Catmandu-PNX ( H/HO/HOCHSTEN/Catmandu-PNX-0.04.tar.gz, HOCHSTEN, 2019; MetaCPAN )
Catmandu-PNX/lib/Catmandu/PNX.pm ( view source; MetaCPAN )
 C<catmandu>:

  catmandu convert PNX to JSON --fix myfixes.txt < data/pnx.xml > data/pnx.json

  catmandu convert JSON to PNX --fix myfixes.txt < data/pnx.json > data/pnx.xml

See documentation of mo
Catmandu-XSD ( H/HO/HOCHSTEN/Catmandu-XSD-0.05.tar.gz, HOCHSTEN, 2019; MetaCPAN )
Catmandu-XSD/lib/Catmandu/XSD.pm ( view source; MetaCPAN )
odules for handling XML data with XSD compilation

=head1 SYNOPSIS

    ## Converting XML to YAML/JSON/CSV/etc

    # Compile an XSD schema file and parse one shiporder.xml file
    catmandu convert X
//Record/Payload/*'
                         to YAML < data/container.xml

    ## Convert an YAML/JSON/CSV into XML validated against an XSD schemas

    # Convert one shiporder YAML to XML
    catman
:LibXML::Node>s in the
resulting documents. Catmandu output formats such as L<Catmandu::Exporter::JSON>
can't handle these XML::LibXML::Node nodes. You have to implement yourself a
L<Catmandu::Fix> to
RDF-LDF ( H/HO/HOCHSTEN/RDF-LDF-0.25.tar.gz, HOCHSTEN, 2019; MetaCPAN )
RDF-LDF/bin/ldf-client.pl ( view source; MetaCPAN )
;
use RDF::Query;
use Getopt::Long;
use utf8;
use Encode;

use JSON ();
my $JSON = JSON->new->utf8->allow_nonref;
sub encode_json { $JSON->encode(@_) }

my ($subject,$predicate,$object);

@ARGV = map 
":%s,\"object\":%s}\n",
                encode_json($st->subject->value),
                encode_json($st->predicate->value),
                encode_json($st->object->value);
        }
    }
    print
                }
                $h->{$v} = $val; 
            }
            print (",\n") if ($count++ > 0);
            print encode_json($h);
        }
        print "\n";
    }
    print "]\n";
}
Catmandu-PNX ( H/HO/HOCHSTEN/Catmandu-PNX-0.04.tar.gz, HOCHSTEN, 2019; MetaCPAN )
Catmandu-PNX/lib/Catmandu/Exporter/PNX.pm ( view source; MetaCPAN )
) exporter

=head1 SYNOPSIS

    # From the commandline
    $ catmandu convert JSON --fix myfixes to PNX < /tmp/data.json

    # From Perl

    use Catmandu;

    # Print to STDOUT
    my $exporter = 
Method-ParamValidator ( M/MA/MANWAR/Method-ParamValidator-0.16.tar.gz, MANWAR, 2019; MetaCPAN )
Method-ParamValidator/lib/Method/ParamValidator.pm ( view source; MetaCPAN )
or - Configurable method parameter validator.

=head1 VERSION

Version 0.16

=cut

use 5.006;
use JSON;
use Data::Dumper;

use Method::ParamValidator::Key::Field;
use Method::ParamValidator::Key::Meth
();

=head2 Setting up method validator using configuration file.

Sample configuration file in C<JSON> format.

    { "fields"  : [ { "name" : "firstname", "format" : "s" },
                    { "na
onfig.json>.

    use strict; use warnings;
    use Test::More;
    use Test::Exception;
    use Method::ParamValidator;

    my $validator = Method::ParamValidator->new({ config => "config.json" });

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