mirror of
https://github.com/justinrainbow/json-schema.git
synced 2025-03-22 23:30:17 +01:00
* upstream/master: Adding a LICENSE file Adding travis ci config fixed README, fixed required/optional (optional is default) added composer.json Conflicts: README.md composer.json libs/JsonSchema.php libs/JsonSchemaUndefined.php
JSON Schema for PHP
Usage
<?php
$json = json_decode($input_json);
$schema = json_decode($input_schema);
$result = JsonSchema::validate($json, $schema);
if ($result->valid) {
die('success!');
}
else {
die('fail...');
}
Running the tests
$ git submodule update --init
$ phpunit
Languages
PHP
100%