An easy-to-use PHP Json Schema Validator on top of opis/json-schema.
use Ixnode\PhpJsonSchemaValidator\Validator;$data = '[1, 2, 3]';
$schema = [
'type' => 'object'
];
$validator = new Validator(new Json($data), new Json($schema));
$valid = $validator->validate();
// (bool) truecomposer require ixnode/php-json-schema-validatorvendor/bin/php-json-schema-validator -Vphp-json-schema-validator 0.1.0 (12-31-2022 15:51:08) - Björn Hempel <bjoern@hempel.li>git clone git@github.com:ixnode/php-json-schema-validator.git && cd php-json-schema-validatorcomposer installcomposer testThis tool is licensed under the MIT License - see the LICENSE file for details