##----------------------------------------------------------------------------
## JSON Schema Validator - ~/lib/JSON/Schema/Validate.pm
## Version v0.5.1
## Copyright(c) 2025 DEGUEST Pte. Ltd.
## Auth
-------------
package JSON::Schema::Validate;
BEGIN
{
use strict;
use warnings;
use warnings::register;
use vars qw( $VERSION $DEBUG );
use B ();
use JSON ();
use Scalar::U
.
if( $self->{normalize_instance} )
{
my $json = JSON->new->allow_nonref(1)->canonical(1);
$data = $json->decode( $json->encode( $data ) );
}
return( $self->_prune_wit
ng utf-8
=head1 NAME
JSON::Schema::Validate::Error - JSON Schema Exception
=head1 SYNOPSIS
use JSON::Schema::Validate::Error;
# Legacy 2-arg form:
my $err = JSON::Schema::Validate::Er
or->new( '/user/name', 'minLength violated' );
# Named-arg form (recommended):
my $err = JSON::Schema::Validate::Error->new(
path => '/user/name',
message =
horter than minLength 1"
# Comparisons (compare by message+path):
say 'same' if( $err eq JSON::Schema::Validate::Error->new( '/user/name', 'string shorter than minLength 1' ) );
# Hash v