JSON::SchemaValidator - JSON Schema Validator
my $validator = JSON::SchemaValidator->new; my $result = $validator->validate([1], {type => 'object'}); if (!$result->is_success) { # [ # { # uri => '#', # message => "Must be of type object", # attribute => 'type', # details => ['object'] # } # ] return $result->errors; }
JSON::SchemaValidator is a JSON schema validator.
http://github.com/vti/json-schemavalidator
This distribution contains specification tests, that can run as following:
# Run specific draft JSON_SCHEMA_SPEC='draft=draft4' prove t/spec.t # Run specific suite JSON_SCHEMA_SPEC='draft=draft4!suite=minProperties' prove t/spec.t
Viacheslav Tykhanovskyi, vti@cpan.org.
vti@cpan.org
Copyright (C) 2020, Viacheslav Tykhanovskyi
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
To install JSON::SchemaValidator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSON::SchemaValidator
CPAN shell
perl -MCPAN -e shell install JSON::SchemaValidator
For more information on module installation, please visit the detailed CPAN module installation guide.