-
-
01 Dec 2021 18:37:03 UTC
- Distribution: JSONSchema-Validator
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (246 / 0 / 5)
- Kwalitee
Bus factor: 5- 80.73% Coverage
- License: mit
- Perl: v5.16.0
- Activity
24 month- Tools
- Download (49.75KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 8 contributors-
Alexey Stavrov
-
Ivan Putintsev
-
Anton Fedotov
-
Denis Ibaev
-
Andrey Khozov
-
Erik Huelsmann
-
James Waters
-
uid66
NAME
JSONSchema::Validator::Draft4 - Validator for JSON Schema Draft4
VERSION
version 0.010
SYNOPSIS
$validator = JSONSchema::Validator::Draft4->new(schema => {...}); my ($result, $errors) = $validator->validate_schema($object_to_validate);
DESCRIPTION
JSON Schema Draft4 validator with minimum dependencies.
CLASS METHODS
new
Creates JSONSchema::Validator::Draft4 object.
$validator = JSONSchema::Validator::Draft4->new(schema => {...});
Parameters
schema
Scheme according to which validation occurs.
strict
Use strong type checks. Default value is 1.
using_id_with_ref
Consider key
$id
to identify subschema when resolving links. For more details look at json schema docs about named anchors and bundling.scheme_handlers
At the moment, the validator can load a resource using the http, https protocols. You can add other protocols yourself.
sub loader { my $uri = shift; ... } $validator = JSONSchema::Validator::Draft4->new(schema => {...}, scheme_handlers => {ftp => \&loader});
METHODS
validate_schema
Validate object instance according to schema.
AUTHORS
Alexey Stavrov <logioniz@ya.ru>
Ivan Putintsev <uid@rydlab.ru>
Anton Fedotov <tosha.fedotov.2000@gmail.com>
Denis Ibaev <dionys@gmail.com>
Andrey Khozov <andrey@rydlab.ru>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2021 by Alexey Stavrov.
This is free software, licensed under:
The MIT (X11) License
Module Install Instructions
To install JSONSchema::Validator, copy and paste the appropriate command in to your terminal.
cpanm JSONSchema::Validator
perl -MCPAN -e shell install JSONSchema::Validator
For more information on module installation, please visit the detailed CPAN module installation guide.