Group
Extension

Matches 35358

JSON-Slurper ( S/SR/SRCHULO/JSON-Slurper-0.12.tar.gz, SRCHULO, 2019; MetaCPAN )
JSON-Slurper/lib/JSON/Slurper.pm ( view source; MetaCPAN )
package JSON::Slurper;
use strict;
use warnings;
use Carp ();
use Exporter::Shiny qw(slurp_json spurt_json);
use File::Basename ();
use File::Slurper  ();
use Scalar::Util   ();

our $VERSION     = '0
      => [qw(slurp_json spurt_json)],
    std_auto => [qw(-auto_ext slurp_json spurt_json)],
    slurp_auto => [qw(-auto_ext slurp_json)],
    spurt_auto => [qw(-auto_ext spurt_json)],
);

my $DEFAULT
ENV{JSON_SLURPER_NO_JSON_XS} ? do { require JSON::PP; 'JSON::PP' }
        : eval { require Cpanel::JSON::XS; Cpanel::JSON::XS->VERSION('4.09'); 1 } ? 'Cpanel::JSON::XS'
        : do { require JSON::P
Data-Clean-JSON ( P/PE/PERLANCAR/Data-Clean-JSON-0.392.tar.gz, PERLANCAR, 2019; MetaCPAN )
Data-Clean-JSON/lib/Data/Clean/JSON.pm ( view source; MetaCPAN )
package Data::Clean::JSON;

our $DATE = '2019-09-11'; # DATE
our $VERSION = '0.392'; # VERSION

use 5.010001;
use strict;
use warnings;

use parent qw(Data::Clean);

use Exporter qw(import);
our @EXPO
                  clean_json_in_place
                       clone_and_clean_json
               );

sub new {
    my ($class, %opts) = @_;

    # from FromJSON
    $opts{"JSON::PP::Boolean"} //= ['on
e_or_zero'];
    $opts{"JSON::XS::Boolean"} //= ['one_or_zero']; # this doesn't exist though
    $opts{"Cpanel::JSON::XS::Boolean"} //= ['one_or_zero']; # this doesn't exist though

    $opts{DateTime
Catmandu-Importer-getJSON ( V/VO/VOJ/Catmandu-Importer-getJSON-0.52.tar.gz, VOJ, 2019; MetaCPAN )
Catmandu-Importer-getJSON/lib/Catmandu/Fix/get_json.pm ( view source; MetaCPAN )
package Catmandu::Fix::get_json;

our $VERSION = '0.51';

use Catmandu::Sane;
use Catmandu::Util;
use Moo;
use Catmandu::Fix::Has;
use Catmandu::Importer::getJSON;

with "Catmandu::Fix::Base";

has ur
{
        $options{ $self->vars ? 'url' : 'from' } = $self->url;
    }
    Catmandu::Importer::getJSON->new(%options);
}

sub BUILD {
    my ($self) = @_;
    unless ( defined $self->path ) {
        
:get_json - get JSON data from an URL as fix function

=head1 SYNOPSIS

	# fetches a hash or array
	get_json("http://example.com/json")

	# stores it in path.key
	get_json("http://example.com/json", p
WebService-ILS ( S/SR/SRDJAN/WebService-ILS-0.18.tar.gz, SRDJAN, 2019; MetaCPAN )
WebService-ILS/lib/WebService/ILS/JSON.pm ( view source; MetaCPAN )
package WebService::ILS::JSON;

use Modern::Perl;

=encoding utf-8

=head1 NAME

WebService::ILS::JSON - WebService::ILS module for services with JSON API

=head1 DESCRIPTION

To be subclassed

See L<
WebService::ILS>

=cut

use Carp;
use HTTP::Request::Common;
use JSON qw(encode_json);
use URI;

use parent qw(WebService::ILS);

sub with_get_request {
    my $self = shift;
    my $callback = shift 
n::GET( $uri );
    my $response = $self->_request_with_auth($request);
    return $self->process_json_response($response, $callback);
}

sub with_delete_request {
    my $self = shift;
    my $callba
Mojo-JSON-MaybeXS ( D/DB/DBOOK/Mojo-JSON-MaybeXS-1.002.tar.gz, DBOOK, 2019; MetaCPAN )
Mojo-JSON-MaybeXS/lib/Mojo/JSON/MaybeXS.pm ( view source; MetaCPAN )
package Mojo::JSON::MaybeXS;

use strict;
use warnings;
use Mojo::Util 'monkey_patch';
use JSON::MaybeXS 'JSON';
use Mojo::JSON ();

our $VERSION = '1.002';

my $BINARY = JSON::MaybeXS->new(utf8 => 1,
TEXT = JSON::MaybeXS->new(utf8 => 0, canonical => 1, allow_nonref => 1,
	allow_unknown => 1, allow_blessed => 1, convert_blessed => 1);
my $TRUE = JSON->true;
my $FALSE = JSON->false;

if (JSON eq 'Cp
:JSON::XS') {
	local $@;
	if (eval { Cpanel::JSON::XS->VERSION('4.09'); 1 }) {
		$BINARY->allow_dupkeys;
		$TEXT->allow_dupkeys;
	}
	if (eval { Cpanel::JSON::XS->VERSION('3.0112'); 1 }) {
		$BINARY->s
Serge ( A/AF/AFAN/Serge-1.4.tar.gz, AFAN, 2019; MetaCPAN )
Serge/lib/Serge/Engine/Plugin/parse_chrome_json.pm ( view source; MetaCPAN )
package Serge::Engine::Plugin::parse_chrome_json;
use parent Serge::Engine::Plugin::Base::Parser;

use strict;

use JSON -support_by_pp; # -support_by_pp is used to make Perl on Mac happy
use Serge::M
ail;
use Serge::Util qw(xml_escape_strref);

sub name {
    return 'Chrome extension messages.json parser plugin';
}

sub init {
    my $self = shift;

    $self->SUPER::init(@_);

    $self->{errors}
ject = $self->{data}->{email_subject} || ("[".$self->{parent}->{id}.']: Chrome Extension messages.json Parse Errors');

    my $text;
    foreach my $key (sort keys %{$self->{errors}}) {
        my $p
Serge ( A/AF/AFAN/Serge-1.4.tar.gz, AFAN, 2019; MetaCPAN )
Serge/lib/Serge/Engine/Plugin/parse_json_keyvalue.pm ( view source; MetaCPAN )
package Serge::Engine::Plugin::parse_json_keyvalue;
use parent Serge::Engine::Plugin::Base::Parser;

use strict;

use JSON -support_by_pp; # -support_by_pp is used to make Perl on Mac happy
use Serge:
:Mail;
use Serge::Util qw(xml_escape_strref);

sub name {
    return 'JSON Dictionary Parser Plugin';
}

sub init {
    my $self = shift;

    $self->SUPER::init(@_);

    $self->{errors} = {};

    $
;
    }

    my $email_subject = $self->{data}->{email_subject} || ("[".$self->{parent}->{id}.']: JSON Parse Errors');

    my $text;
    foreach my $key (sort keys %{$self->{errors}}) {
        my $p
MooX-TO_JSON ( J/JJ/JJNAPIORK/MooX-TO_JSON-0.001.tar.gz, JJNAPIORK, 2019; MetaCPAN )
MooX-TO_JSON/lib/MooX/TO_JSON.pm ( view source; MetaCPAN )
package MooX::TO_JSON;

use warnings;
use strict;

our $VERSION = '0.001';
$VERSION = eval $VERSION;

use Class::Method::Modifiers qw(install_modifier);

sub import {
  my ($class) = @_;
  my $target 
= caller;

  my @to_json;
  install_modifier $target, 'fresh', 'TO_JSON', sub {
    my $self = shift;
    my @structure = ();
    foreach my $rule (@to_json) {

      if($rule->{omit_if_empty}) {
    
$rule->{mapped_field} => $value,
      );
    }
    @structure = $self->modify_json(@structure) if $self->can('modify_json');
    return +{ @structure };
  };

  my %types = (
    str => 1,
    num =>
Device-Firewall-PaloAlto ( P/PU/PUGLET/Device-Firewall-PaloAlto-0.1.9.tar.gz, PUGLET, 2019; MetaCPAN )
Device-Firewall-PaloAlto/lib/Device/Firewall/PaloAlto/JSON.pm ( view source; MetaCPAN )
ice::Firewall::PaloAlto::JSON;
$Device::Firewall::PaloAlto::JSON::VERSION = '0.1.9';
use strict;
use warnings;
use 5.010;

# We don't want all of the automatic imports
use JSON qw();

use Data::Struct
ODNAME
# ABSTRACT: JSON parent class for Device::Firewall::PaloAlto modules.



sub to_json {
    my ($self, $filename) = @_;
    my $output_fh;

    my $structure = $self->pre_json_transform();

    
_fh;
    }

    $output_fh //= *STDOUT;

    my $json_text = JSON->new->pretty->encode($structure);

    print {$output_fh} $json_text;
}


sub pre_json_transform {
    my $self = shift;
    return un
Serge ( A/AF/AFAN/Serge-1.4.tar.gz, AFAN, 2019; MetaCPAN )
Serge/lib/Serge/Engine/Plugin/parse_json.pm ( view source; MetaCPAN )
kage Serge::Engine::Plugin::parse_json;
use parent Serge::Engine::Plugin::Base::Parser;
use parent Serge::Interface::PluginHost;

use strict;

use File::Path;
use JSON -support_by_pp; # -support_by_pp
Mac happy
use Serge::Mail;
use Serge::Util qw(xml_escape_strref);

sub name {
    return 'Generic JSON tree parser plugin';
}

sub init {
    my $self = shift;

    $self->SUPER::init(@_);

    $self-
;
    }

    my $email_subject = $self->{data}->{email_subject} || ("[".$self->{parent}->{id}.']: JSON Parse Errors');

    my $text;
    foreach my $key (sort keys %{$self->{errors}}) {
        my $p
JSON-ize ( M/MA/MAJENSEN/JSON-ize-0.202.tar.gz, MAJENSEN, 2019; MetaCPAN )
JSON-ize/lib/JSON/ize.pm ( view source; MetaCPAN )
package JSON::ize;
use base Exporter;
use JSON::MaybeXS;
use YAML::Any qw/Dump Load LoadFile DumpFile/;
use Try::Tiny;
use strict;
use warnings;

our $JOBJ = JSON::MaybeXS->new();
our $YOBJ;
our $_las
t_out = "";

our @EXPORT = qw/jsonize jsonise J yamlize yamlise Y parsej pretty_json ugly_json/;
our $VERSION = "0.202";

sub jobj { $JOBJ }

sub jsonize (;$) {
  my $inp = shift;
  if (!defined $inp)
p) : jobj()->encode($inp);
  }
  else { # scalar: decode if looks like json or yaml, or slurp if filename
    if (looks_like_json($inp)) {
      return $_last_out = jobj()->decode($inp);
    }
    els
Datahub-Factory ( N/NE/NETSENSEI/Datahub-Factory-1.77.tar.gz, NETSENSEI, 2019; MetaCPAN )
Datahub-Factory/lib/Datahub/Factory/Exporter/JSON.pm ( view source; MetaCPAN )
package Datahub::Factory::Exporter::JSON;

use Datahub::Factory::Sane;

our $VERSION = '1.77';

use Moo;
use Catmandu;
use namespace::clean;

with 'Datahub::Factory::Exporter';

sub _build_out {
    m
JSON');
    return $exporter;
}

sub add {
    my ($self, $item) = @_;
    $self->out->add($item);
}

1;

__END__

=encoding utf-8

=head1 NAME

Datahub::Factory::Exporter::JSON - Export items to JSON
tory;

    my $exporter = Datahub::Factory->exporter('JSON')->new();

    $exporter->add({'id' => 1});

=head1 DESCRIPTION

Convert records to JSON and send them to STDOUT. The records are
convert as-
Datahub-Factory ( N/NE/NETSENSEI/Datahub-Factory-1.77.tar.gz, NETSENSEI, 2019; MetaCPAN )
Datahub-Factory/lib/Datahub/Factory/Importer/JSON.pm ( view source; MetaCPAN )
package Datahub::Factory::Importer::JSON;

use Datahub::Factory::Sane;

our $VERSION = '1.77';

use Moo;
use Catmandu;
use namespace::clean;

with 'Datahub::Factory::Importer';

has file_name => (is =
 Catmandu->importer('JSON', file => $self->file_name);

    return $importer;
}

1;

__END__

=encoding utf-8

=head1 NAME

Datahub::Factory::Importer::JSON - Import data from JSON flat file data dump
ory;
    use Data::Dumper qw(Dumper);

    my $json = Datahub::Factory->importer('JSON')->new(
        file_name => '/tmp/export.json',
    );

    $json->importer->each(sub {
        my $item = shift
JSON-API ( G/GF/GFRANKS/JSON-API-v1.1.1.tar.gz, GFRANKS, 2019; MetaCPAN )
JSON-API/lib/JSON/API.pm ( view source; MetaCPAN )
package JSON::API;
use strict;
use HTTP::Status qw/:constants/;
use LWP::UserAgent;
use JSON;
use Data::Dumper;
use URI::Encode qw/uri_encode/;

BEGIN {
	use Exporter ();
	use vars qw($VERSION @ISA @E
ication/json',
			'Content-Type' => 'application/json',
	);
        if( $apphdr && ref $apphdr ) {
            $headers->header( $_, $apphdr->{$_} ) foreach (keys %$apphdr);
        }
	my $json;
	if (
defined $data) {
		$json = $self->_encode($data);
		return (wantarray ? (500, {}) : {}) unless defined $json;
	}

	my $req = HTTP::Request->new($method, $url, $headers, $json);
	$self->_debug("Request
eris ( B/BL/BLHOTSKY/eris-0.008.tar.gz, BLHOTSKY, 2019; MetaCPAN )
eris/lib/eris/log/decoder/json.pm ( view source; MetaCPAN )
package eris::log::decoder::json;
# ABSTRACT: Decodes any detected JSON in a log line from then opening curly brace

use JSON::MaybeXS;
use Moo;
use namespace::autoclean;

with qw(
    eris::role::dec
 JSON Docs will start with a '{', check for it.
    my $start = index($msg, '{');
    if( $start >= 0 ) {
        my $json_str = substr($msg, $start);
        eval {
            $decoded = decode_json
( $json_str );
            1;
        };
    }
    return $decoded;
}


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

eris::log::decoder::json - Decodes any detected JSON in a log line from then op
Test-DBChanges ( D/DA/DAKKAR/Test-DBChanges-1.0.2.tar.gz, DAKKAR, 2019; MetaCPAN )
Test-DBChanges/lib/Test/DBChanges/Role/JSON.pm ( view source; MetaCPAN )
e Test::DBChanges::Role::JSON;
use Moo::Role;
use JSON::MaybeXS ();
use namespace::autoclean;

our $VERSION = '1.0.2'; # VERSION
# ABSTRACT: decode data that's recorded as JSON


sub decode_recorded_d
) = @_;

    return JSON::MaybeXS::decode_json($recoded_data);
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Test::DBChanges::Role::JSON - decode data that's recorded as JSON

=head1 VERSION

ve
rsion 1.0.2

=head1 DESCRIPTION

Classes that store changes as JSON should consume this role.

=for Pod::Coverage decode_recorded_data

=head1 AUTHOR

Gianni Ceccarelli <gianni.ceccarelli@broadbean.co
Test2-Tools-JSON-Pointer ( P/PL/PLICEASE/Test2-Tools-JSON-Pointer-0.02.tar.gz, PLICEASE, 2019; MetaCPAN )
Test2-Tools-JSON-Pointer/lib/Test2/Tools/JSON/Pointer.pm ( view source; MetaCPAN )
st2::Tools::JSON::Pointer;

use strict;
use warnings;
use utf8;
use 5.008001;
use JSON::MaybeXS qw( JSON );
use Test2::Compare::JSON::Pointer;
use parent 'Exporter';

our @EXPORT = qw( json );

# ABST
RACT: Compare parts of JSON string to data structure using JSON pointers VERSION
our $VERSION = '0.02'; # VERSION


sub json ($;$)
{
  my($pointer, $json) = @_ == 1 ? ('', $_[0]) : (@_);
  my @caller 
= caller;
  Test2::Compare::JSON::Pointer->new(
    file    => $caller[1],
    lines   => [$caller[2]],
    input   => $json,
    pointer => $pointer,
    json    => JSON->new->utf8(1),
  );
}

my $co
Test2-Tools-JSON-Pointer ( P/PL/PLICEASE/Test2-Tools-JSON-Pointer-0.02.tar.gz, PLICEASE, 2019; MetaCPAN )
Test2-Tools-JSON-Pointer/lib/Test2/Compare/JSON/Pointer.pm ( view source; MetaCPAN )
package Test2::Compare::JSON::Pointer;

use strict;
use warnings;
use Test2::Util::HashBase qw( pointer input json );
use JSON::Pointer;
use Encode ();
use parent 'Test2::Compare::Base';

# ABSTRACT: 
entation of a hash or array reference pointed to by a JSON pointer during deep comparison.
our $VERSION = '0.02'; # VERSION


sub operator { 'JSON PTR' }

sub name
{
  my($self) = @_;
  my($input, $po
t_root_ref = eval {
    $self->{+JSON}->decode($self->_convert_got($got));
  };

  my $pointer = $self->{+POINTER};
  my $id = [ META => $pointer eq '' ? 'JSON' : "JSON $pointer" ];

  if(my $error = 
Anansi-Script-JSON ( A/AN/ANANSI/Anansi-Script-JSON-0.02.tar.gz, ANANSI, 2019; MetaCPAN )
Anansi-Script-JSON/lib/Anansi/Script/JSON.pm ( view source; MetaCPAN )
package Anansi::Script::JSON;


=head1 NAME

Anansi::Script::JSON - Defines the mechanisms specific to handling JSON-RPC.

=head1 SYNOPSIS

    my $OBJECT = Anansi::Script::JSON->new();

=head1 DESCRI
}}{$name} = $self->{CGI}->param($name);
    }
}


=head2 medium

    my $medium = Anansi::Script::JSON->medium();

    my $medium = $OBJECT->medium();

    my $medium = $OBJECT->channel('MEDIUM');

Re
hannel;
    $channel = shift(@_) if(0 < scalar(@_));
    return 'JSON-RPC';
}

Anansi::ScriptComponent::addChannel('Anansi::Script::JSON', 'MEDIUM' => 'medium');


=head2 parameter

    my $parameters
JSON-Schema-Fit ( L/LI/LIOSHA/JSON-Schema-Fit-0.07.tar.gz, LIOSHA, 2019; MetaCPAN )
JSON-Schema-Fit/lib/JSON/Schema/Fit.pm ( view source; MetaCPAN )
package JSON::Schema::Fit;
$JSON::Schema::Fit::VERSION = '0.07';
# ABSTRACT: adjust data structure according to json-schema


use 5.010;
use strict;
use warnings;
use utf8;

use Carp;

use JSON;
use S
truc, $schema, $jpath) = @_;

    return $struc if !$self->booleans();
    return JSON::true if $struc;
    return JSON::false;
}


sub _get_adjusted_integer {
    my ($self, $struc, $schema, $jpath) 
ath . "['$key']";
}


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

JSON::Schema::Fit - adjust data structure according to json-schema

=head1 VERSION

version 0.07

=head1 SYNOPSIS

    my $data =

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