The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

JsonSQL::Schemas::Schema - JSON schema base class. Used as a dispatcher for loading JSON schema objects used by JsonSQL::Validator.

VERSION

version 0.41

SYNOPSIS

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,

If you desire other JSON schemas you can create your own...

METHODS

Constructor new -> JsonSQL::Schemas::Schema

An inherited constructor for creating the blessed object reference. This should not be called directly. Instead use load_schema.

Dispatcher load_schema($jsonSchema) -> JsonSQL::Schemas<schema>

Serves as a dispatcher method to load the appropriate subclass for the specified $jsonSchema.

    $jsonSchema         => The name of the JSON schema to load.

AUTHOR

Chris Hoefler <bhoefler@draper.com>

COPYRIGHT AND LICENSE

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.