JsonSQL::Schemas::Schema - JSON schema base class. Used as a dispatcher for loading JSON schema objects used by JsonSQL::Validator.
version 0.4
This is a supporting module used by JsonSQL::Validator for loading JSON schemas.
To use this:
my $schema = JsonSQL::Schemas::Schema->load_schema(<schema_name>); if ( eval { $schema->is_error } ) { return "Could not load JSON schema: $schema->{message}"; } else { ... }
<schemaname> must be a module residing in JsonSQL::Schemas that is a subclass of this one. See, for example,
JsonSQL::Schemas::select
JsonSQL::Schemas::insert
If you desire other JSON schemas you can create your own...
An inherited constructor for creating the blessed object reference. This should not be called directly. Instead use load_schema.
Serves as a dispatcher method to load the appropriate subclass for the specified $jsonSchema.
$jsonSchema => The name of the JSON schema to load.
Chris Hoefler <bhoefler@draper.com>
This software is copyright (c) 2017 by Chris Hoefler.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install JsonSQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JsonSQL
CPAN shell
perl -MCPAN -e shell install JsonSQL
For more information on module installation, please visit the detailed CPAN module installation guide.