Group
Extension

Matches 35358

JSON-Schema-AsType ( Y/YA/YANICK/JSON-Schema-AsType-0.4.4.tar.gz, YANICK, 2024; MetaCPAN )
JSON-Schema-AsType/lib/JSON/Schema/AsType/Draft6.pm ( view source; MetaCPAN )
package JSON::Schema::AsType::Draft6;
our $AUTHORITY = 'cpan:YANICK';
# ABSTRACT: Role processing draft6 JSON Schema 
$JSON::Schema::AsType::Draft6::VERSION = '0.4.4';

use strict;
use warnings;

use 
Str ArrayRef Int slurpy Dict Optional slurpy /; 

use JSON;

use JSON::Schema::AsType;

use JSON::Schema::AsType::Draft6::Types '-all';

with 'JSON::Schema::AsType::Draft4';

override all_keywords => 
 my $self = shift;

    return super() if ref $self->schema eq 'HASH';

    use JSON;
    return( ( $self->schema eq JSON::true) ? Any : ~Any );
    
};

sub _keyword_const {
    my $self = shift;

  
JSON-Schema-AsType ( Y/YA/YANICK/JSON-Schema-AsType-0.4.4.tar.gz, YANICK, 2024; MetaCPAN )
JSON-Schema-AsType/lib/JSON/Schema/AsType/Draft3.pm ( view source; MetaCPAN )
package JSON::Schema::AsType::Draft3;
our $AUTHORITY = 'cpan:YANICK';
# ABSTRACT: Role processing draft3 JSON Schema 
$JSON::Schema::AsType::Draft3::VERSION = '0.4.4';

use strict;
use warnings;

use 
ils qw/ any all none uniq zip /;

use JSON::Schema::AsType;

use JSON;

use JSON::Schema::AsType::Draft3::Types '-all';
use Types::Standard 'Optional';

with 'JSON::Schema::AsType::Draft4' => {
    -e
dencies
    ];

}

JSON::Schema::AsType->new(
    draft_version => '3',
    uri           => "http${_}://json-schema.org/draft-03/schema",
    schema        => from_json <<'END_JSON' )->type for '', '
JSON-Schema-AsType ( Y/YA/YANICK/JSON-Schema-AsType-0.4.4.tar.gz, YANICK, 2024; MetaCPAN )
JSON-Schema-AsType/lib/JSON/Schema/AsType.pm ( view source; MetaCPAN )
package JSON::Schema::AsType;
our $AUTHORITY = 'cpan:YANICK';
# ABSTRACT: generates Type::Tiny types out of JSON schemas
$JSON::Schema::AsType::VERSION = '0.4.4';
use 5.14.0;

use strict;
use warnings
:Utils;
use LWP::Simple;
use Clone 'clone';
use URI;

use Moose::Util qw/ apply_all_roles /;

use JSON;

use Moose;

use MooseX::MungeHas 'is_ro';
use MooseX::ClassAttribute;

no warnings 'uninitializ
c => (
    is => 'ro',
    lazy => 1,
    default => sub {
        $_[0]->fetch( sprintf "https://json-schema.org/draft-%02d/schema", $_[0]->draft_version );
    },
);

has schema => ( 
    predicate 
JSON-Schema-AsType ( Y/YA/YANICK/JSON-Schema-AsType-0.4.4.tar.gz, YANICK, 2024; MetaCPAN )
JSON-Schema-AsType/lib/JSON/Schema/AsType/Draft4.pm ( view source; MetaCPAN )
package JSON::Schema::AsType::Draft4;
our $AUTHORITY = 'cpan:YANICK';
# ABSTRACT: Role processing draft4 JSON Schema 
$JSON::Schema::AsType::Draft4::VERSION = '0.4.4';

use strict;
use warnings;

use 
Of HashRef StrictNum Any Str ArrayRef Int slurpy Dict Optional slurpy /; 

use JSON;

use JSON::Schema::AsType;

use JSON::Schema::AsType::Draft4::Types '-all';

override all_keywords => sub {
    my 
   my $schema = $self->resolve_reference($ref);

                join "\n", "ref schema is " . to_json($schema->schema, { allow_nonref => 1 }), @{$schema->validate_explain($_)} 
            }
        
MarpaX-ESLIF ( J/JD/JDDPAUSE/MarpaX-ESLIF-6.0.35.1.tar.gz, JDDPAUSE, 2024; MetaCPAN )
MarpaX-ESLIF/lib/MarpaX/ESLIF/JSON/Decoder.pm ( view source; MetaCPAN )
SLIF::JSON::Decoder;
use parent qw/MarpaX::ESLIF::Grammar/;
use MarpaX::ESLIF::JSON::Decoder::RecognizerInterface;

#
# Base required class methods
#
sub _ALLOCATE { return \&MarpaX::ESLIF::JSON::Deco
  ($definedStrict && $_definedStrict && ($strict == $args_ref->[1]))
    }
}

# ABSTRACT: ESLIF's JSON decoder interface

our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY

our $VERSION = '6.0.35.1'; # VE
ub decode {
    my ($self, $string, %options) = @_;

    my $recognizerInterface = MarpaX::ESLIF::JSON::Decoder::RecognizerInterface->new($string, $options{encoding});
    return $self->_decode($recog
JSON-ToHTML ( A/AR/ARISTOTLE/JSON-ToHTML-0.001.tar.gz, ARISTOTLE, 2024; MetaCPAN )
JSON-ToHTML/lib/JSON/ToHTML.pm ( view source; MetaCPAN )
006; use strict; use warnings;

package JSON::ToHTML;

our $VERSION = '0.001';

use Scalar::Util ();

sub json_object_to_html;
sub json_array_to_html;

sub json_values_to_html {
	my $copy;
	map +(
		(
         ? '<i>null</i>'
		: 'HASH'  eq ref $_                  ? json_object_to_html $_
		: 'ARRAY' eq ref $_                  ? json_array_to_html $_
		: eval { $$_ eq 1 or $$_ eq 0 }      ? ( $$_ ?
/div>'
		: grep s!([<>"'&@\x{80}-\x{10FFFF}])!'&#'.(ord $1).';'!ge || 1, $copy = $_
	), @_
}

sub json_identical_keys {
	return if grep 'HASH' ne ref, @_;
	my $keyset = join ':', map length . $_, my @
marc-moose ( F/FR/FREDERICD/marc-moose-1.0.49.tar.gz, FREDERICD, 2024; MetaCPAN )
marc-moose/lib/MARC/Moose/Parser/Json.pm ( view source; MetaCPAN )
package MARC::Moose::Parser::Json;
# ABSTRACT: Parser for JSON records
$MARC::Moose::Parser::Json::VERSION = '1.0.49';
use Moose;
extends 'MARC::Moose::Parser';
use JSON;


override 'parse' => sub {
 
   my ($self, $raw) = @_;
    return unless $raw;
    my $json = from_json($raw);
    my @jfields = @{$json->{fields}};
    my @fields;
    while ( @jfields ) {
        my $tag = shift @jfields;
     
 value => $value );
        }
    }
    my $record = MARC::Moose::Record->new(
        leader => $json->{leader},
        fields => \@fields );
    $record->lint($self->lint) if $record->lint;
    ret
marc-moose ( F/FR/FREDERICD/marc-moose-1.0.49.tar.gz, FREDERICD, 2024; MetaCPAN )
marc-moose/lib/MARC/Moose/Formater/Json.pm ( view source; MetaCPAN )
package MARC::Moose::Formater::Json;
# ABSTRACT: Record formater into a Json representation
$MARC::Moose::Formater::Json::VERSION = '1.0.49';
use Moose;

extends 'MARC::Moose::Formater';

use MARC::Mo
ose::Field::Control;
use MARC::Moose::Field::Std;
use JSON;

has pretty => ( is => 'rw', isa => 'Bool', default => 0 );

override 'format' => sub {
    my ($self, $record) = @_;

    my $rec = {
     
o_json($rec, { pretty => $self->pretty } ) . ",\n";
};

__PACKAGE__->meta->make_immutable;

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

MARC::Moose::Formater::Json - Record formater into a Json r
Catmandu-DBI ( N/NJ/NJFRANCK/Catmandu-DBI-0.13.tar.gz, NJFRANCK, 2024; MetaCPAN )
Catmandu-DBI/lib/Catmandu/Serializer/json_string.pm ( view source; MetaCPAN )
mandu::Serializer::json_string;

use Catmandu::Sane;
use JSON qw();
use Moo;

has json => (
    is       => "ro",
    lazy     => 1,
    init_arg => undef,
    default  => sub {JSON->new()->utf8(0);}
ze {
    $_[0]->json()->encode($_[1]);
}

sub deserialize {
    $_[0]->json()->decode($_[1]);
}

1;

__END__

=pod

=head1 NAME

Catmandu::Serializer - A (de)serializer from and to json strings

=head
1 DESCRIPTION

    serializer 'json' returns a binary utf-8 string,
    which only makes sense if you  send your data to column of type 'binary'

    use this serializer if your data column is a text 
Config-JSON-Enhanced ( B/BL/BLIAKO/Config-JSON-Enhanced-0.10.tar.gz, BLIAKO, 2024; MetaCPAN )
Config-JSON-Enhanced/lib/Config/JSON/Enhanced.pm ( view source; MetaCPAN )
:JSON::Enhanced;

use 5.010;
use strict;
use warnings;

our $VERSION = '0.10';

use strict;
use warnings;

# which loads JSON::XS with a purel-perl JSON fallback
use JSON;

use Data::Roundtrip qw/json
() don't import it
our @ISA = qw(Exporter);
our @EXPORT = qw/
	config2perl
/;

# Convert enhanced JSON string into a Perl data structure.
# The input parameters hashref:
#  * specify where is the cont
ute
#      <% xx %> with hello
#  * optional 'remove-comments-in-strings' to remove comments from JSON strings
#    (both keys and values), default is to KEEP anything inside a string
#    even if it 
Data-Printer ( G/GA/GARU/Data-Printer-1.002001.tar.gz, GARU, 2024; MetaCPAN )
Data-Printer/lib/Data/Printer/Profile/JSON.pm ( view source; MetaCPAN )
package Data::Printer::Profile::JSON;
use strict;
use warnings;

sub profile {
    return {
        show_tainted => 0,
        show_unicode => 0,
        show_lvalue  => 0,
        print_escapes => 0,
     '-class'  => \&_json_class_filter,
                'SCALAR'  => \&_json_scalar_filter,
                'LVALUE'  => \&_json_scalar_filter,
                'CODE'    => \&_json_code_filter,
      
      'FORMAT'  => \&_json_format_filter,
                'GLOB'    => \&_json_glob_filter,
                'REF'     => \&_json_ref_filter,,
                'Regexp'  => \&_json_regexp_filter,
      
Search-Elasticsearch ( E/EZ/EZIMUEL/Search-Elasticsearch-8.12.tar.gz, EZIMUEL, 2024; MetaCPAN )
Search-Elasticsearch/lib/Search/Elasticsearch/Role/Serializer/JSON.pm ( view source; MetaCPAN )

package Search::Elasticsearch::Role::Serializer::JSON;
$Search::Elasticsearch::Role::Serializer::JSON::VERSION = '8.12';
use Moo::Role;
requires 'JSON';

use Search::Elasticsearch::Util qw(throw);
us
de_utf8 is_utf8);
use namespace::clean;

has 'mime_type' => ( is => 'ro', default => 'application/json' );

with 'Search::Elasticsearch::Role::Serializer';

#===================================
sub en
n is_utf8($var)
            ? encode_utf8($var)
            : $var;
    }
    return try { $self->JSON->encode($var) }
    catch { throw( "Serializer", $_, { var => $var } ) };
}

#===================
Log-Log4perl-Layout-JSON ( M/MS/MSCHOUT/Log-Log4perl-Layout-JSON-0.61.tar.gz, MSCHOUT, 2024; MetaCPAN )
Log-Log4perl-Layout-JSON/lib/Log/Log4perl/Layout/JSON.pm ( view source; MetaCPAN )
package Log::Log4perl::Layout::JSON;
$Log::Log4perl::Layout::JSON::VERSION = '0.61';
# ABSTRACT: Layout a log message as a JSON hash, including MDC data

use 5.010;
use strict;
use warnings;

use pare
nt qw(Log::Log4perl::Layout);

use Carp;
use JSON::MaybeXS;
use Log::Log4perl ();
use Log::Log4perl::Layout::PatternLayout;
use Log::Log4perl::Level;
use Scalar::Util qw(blessed);

# TODO
#   add eval


use Class::Tiny {

    prefix => "",
    format_prefix => 0,

    codec => sub {
        return JSON::MaybeXS->new
            ->indent(0)          # to prevent newlines (and save space)
           
Spreadsheet-HTML ( J/JE/JEFFA/Spreadsheet-HTML-1.22.tar.gz, JEFFA, 2024; MetaCPAN )
Spreadsheet-HTML/lib/Spreadsheet/HTML/File/Loader.pm ( view source; MetaCPAN )
  } else {
            my $uri = URI->new( $args->{file} );
            my @ext = qw( .html .htm .json .jsn .yaml .yml .gif .png .jpg .jpeg .csv .xls .xlsx .sxc .ods );
            my (undef,undef,$su
TML::_parse( $args );
    } elsif ($file =~ /\.jso?n$/) {
        return Spreadsheet::HTML::File::JSON::_parse( $args );
    } elsif ($file =~ /\.ya?ml$/) {
        return Spreadsheet::HTML::File::YAM
.htm' )
  generate( file => 'foo.html' )

=item * JSON

Parses with (requires) L<JSON>.

  generate( file => 'foo.jsn' )
  generate( file => 'foo.json' )

=item * YAML

Parses with (requires) L<YAML>.
Search-Elasticsearch ( E/EZ/EZIMUEL/Search-Elasticsearch-8.12.tar.gz, EZIMUEL, 2024; MetaCPAN )
Search-Elasticsearch/lib/Search/Elasticsearch/Serializer/JSON.pm ( view source; MetaCPAN )
icsearch::Serializer::JSON;
$Search::Elasticsearch::Serializer::JSON::VERSION = '8.12';
use Moo;
use JSON::MaybeXS 1.002002 ();

has 'JSON' => ( is => 'ro', default => sub { JSON::MaybeXS->new->utf8(1
:JSON';
use namespace::clean;

1;

# ABSTRACT: The default JSON Serializer, using JSON::MaybeXS

__END__

=pod

=encoding UTF-8

=head1 NAME

Search::Elasticsearch::Serializer::JSON - The default JSON
 Serializer, using JSON::MaybeXS

=head1 VERSION

version 8.12

=head1 SYNOPSIS

    $e = Search::Elasticsearch(
        # serializer => 'JSON'
    );

=head1 DESCRIPTION

This default Serializer clas
Search-Elasticsearch ( E/EZ/EZIMUEL/Search-Elasticsearch-8.12.tar.gz, EZIMUEL, 2024; MetaCPAN )
Search-Elasticsearch/lib/Search/Elasticsearch/Serializer/JSON/XS.pm ( view source; MetaCPAN )
sticsearch::Serializer::JSON::XS;
$Search::Elasticsearch::Serializer::JSON::XS::VERSION = '8.12';
use Moo;
use JSON::XS 2.26;

has 'JSON' => ( is => 'ro', default => sub { JSON::XS->new->utf8(1) } );
arch::Elasticsearch::Role::Serializer::JSON';

1;

=pod

=encoding UTF-8

=head1 NAME

Search::Elasticsearch::Serializer::JSON::XS - A JSON Serializer using JSON::XS

=head1 VERSION

version 8.12

=he
h(
        serializer => 'JSON::XS'
    );

=head1 DESCRIPTION

While the default serializer, L<Search::Elasticsearch::Serializer::JSON>,
tries to choose the appropriate JSON backend, this module allo
Search-Elasticsearch ( E/EZ/EZIMUEL/Search-Elasticsearch-8.12.tar.gz, EZIMUEL, 2024; MetaCPAN )
Search-Elasticsearch/lib/Search/Elasticsearch/Serializer/JSON/PP.pm ( view source; MetaCPAN )
Elasticsearch::Serializer::JSON::PP;
$Search::Elasticsearch::Serializer::JSON::PP::VERSION = '8.12';
use Moo;
use JSON::PP;

has 'JSON' => ( is => 'ro', default => sub { JSON::PP->new->utf8(1) } );

w
Serializer::JSON';

1;

# ABSTRACT: A JSON Serializer using JSON::PP

__END__

=pod

=encoding UTF-8

=head1 NAME

Search::Elasticsearch::Serializer::JSON::PP - A JSON Serializer using JSON::PP

=head
h(
        serializer => 'JSON::PP'
    );

=head1 DESCRIPTION

While the default serializer, L<Search::Elasticsearch::Serializer::JSON>,
tries to choose the appropriate JSON backend, this module allo
Search-Elasticsearch ( E/EZ/EZIMUEL/Search-Elasticsearch-8.12.tar.gz, EZIMUEL, 2024; MetaCPAN )
Search-Elasticsearch/lib/Search/Elasticsearch/Serializer/JSON/Cpanel.pm ( view source; MetaCPAN )
:Serializer::JSON::Cpanel;
$Search::Elasticsearch::Serializer::JSON::Cpanel::VERSION = '8.12';
use Cpanel::JSON::XS;
use Moo;

has 'JSON' =>
    ( is => 'ro', default => sub { Cpanel::JSON::XS->new->u
Elasticsearch::Role::Serializer::JSON';

1;

=pod

=encoding UTF-8

=head1 NAME

Search::Elasticsearch::Serializer::JSON::Cpanel - A JSON Serializer using Cpanel::JSON::XS

=head1 VERSION

version 8.1

        serializer => 'JSON::Cpanel'
    );

=head1 DESCRIPTION

While the default serializer, L<Search::Elasticsearch::Serializer::JSON>,
tries to choose the appropriate JSON backend, this module al
Aion-Format ( D/DA/DART/Aion-Format-0.0.10.tar.gz, DART, 2024; MetaCPAN )
Aion-Format/lib/Aion/Format/Json.pm ( view source; MetaCPAN )
package Aion::Format::Json;

use common::sense;
use JSON::XS qw//;

use Exporter qw/import/;
our @EXPORT = our @EXPORT_OK = grep {
    *{$Aion::Format::Json::{$_}}{CODE} && !/^(_|(NaN|import)\z)/n
} k
ory json

# Настраиваем json
our $JSON = JSON::XS->new->allow_nonref->indent(1)->space_after(1)->canonical(1);

# В json
sub to_json(;$) {
	$JSON->encode(@_ == 0? $_: @_)
}

# Из json
su
_json(;$) {
	$JSON->decode(@_ == 0? $_: @_)
}

1;

__END__

=encoding utf-8

=head1 NAME

Aion::Format::Json - Perl extension for formatting JSON

=head1 SYNOPSIS

	use Aion::Format::Json;
	
	to_json 
PayProp-API-Public-Client ( Y/YA/YANGAK/PayProp-API-Public-Client-0.04.tar.gz, YANGAK, 2023; MetaCPAN )
PayProp-API-Public-Client/lib/PayProp/API/Public/Client/Role/JSON.pm ( view source; MetaCPAN )
package PayProp::API::Public::Client::Role::JSON;

use strict;
use warnings;

use Mouse::Role;

sub TO_JSON {
	my ( $self, $value, $structure ) = @_;

	$value //= $self unless $structure;
	$structure 
@items, $self->TO_JSON( $item, $structure );
		}
		return \@items;
	}
	elsif ( $ref_type eq 'HASH' ) {
		foreach my $key ( keys $value->%* ) {
			$structure->{ $key } = $self->TO_JSON( $value->{ $key 
	my $item = $value->$reader;

			$structure->{ $key } //= {};
			$structure->{ $key } = $self->TO_JSON( $item, $structure->{ $key } );
		}
	}
	else {
		die "Unhandled ref_type: $ref_type";
	}

	return

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