e Data::Object::Class;
use Data::Object::ClassHas;
use JSON::Validator;
our $VERSION = '0.02'; # VERSION
our $GITHUB_SOURCE = 'iamalnewkirk/json-sql';
# ATTRIBUTES
has schema => (
is => 'ro',
=> 'InstanceOf["JSON::Validator"]',
new => 1
);
fun new_validator($self) {
local $ENV{JSON_VALIDATOR_CACHE_ANYWAYS} = 1
unless exists $ENV{JSON_VALIDATOR_CACHE_ANYWAYS};
JSON::Validator->ne
issues ? 1 : 0;
}
1;
=encoding utf8
=head1 NAME
SQL::Validator - Validate JSON-SQL
=cut
=head1 ABSTRACT
Validate JSON-SQL Schemas
=cut
=head1 SYNOPSIS
use SQL::Validator;
my $sql = SQL::
= '0.02'; # VERSION
# ATTRIBUTES
has 'issues' => (
is => 'ro',
isa => 'ArrayRef[InstanceOf["JSON::Validator::Error"]]',
req => 1,
);
# METHODS
method match(Str $key = '/') {
$key =~ s/^\/*
SQL::Validator::Error - JSON-SQL Schema Validation Error
=cut
=head1 ABSTRACT
JSON-SQL Schema Validation Error
=cut
=head1 SYNOPSIS
use SQL::Validator::Error;
use JSON::Validator::Error;
dator::Error->new(
issues => [
JSON::Validator::Error->new('/root', 'not okay'),
JSON::Validator::Error->new('/node/0', 'not okay'),
JSON::Validator::Error->new('/node/1', 'not o