Download the PHP package sgpinkus/jsonschema without Composer
On this page you can find all versions of the php package sgpinkus/jsonschema. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package jsonschema
Overview 
Draft v6 compliant JSON Schema validator for PHP:
- Modular design.
- Simple interface for validation.
- JsonRef dereferencing is handled by an external PHP library JsonRef. You can easily replace it with a different one.
- Easily extensible with custom constraints.
- Draft v4 compatible.
Installation
composer install sgpinkus/jsonschema
Test
git clone ... && cd JsonSchema
git submodule update --init
composer test
Usage
In the simplest case, where you have a standalone JSON schema with no $refs
:
If you have any $refs
in your JSON schema, you need to use the JsonRef
wrapper class to load and dereference the JSON schema documents:
To implement custom constraints extend the Constraint
class and implement abstract methods, then
register the constraint when creating the JsonSchema
instance:
Also see cli-validator.php for example code.
TODO
See TODO.
CONFORMANCE
See conformance notes.
All versions of jsonschema with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1
sgpinkus/jsonref Version dev-master
sgpinkus/simplelogger Version dev-master
sgpinkus/jsonref Version dev-master
sgpinkus/simplelogger Version dev-master
The package sgpinkus/jsonschema contains the following files
Loading the files please wait ....