2011-12-10 13:35:47 -07:00
2011-12-10 13:40:25 +01:00
2011-09-30 19:01:38 +02:00
2011-12-10 12:31:28 +01:00
2011-12-09 14:47:39 -07:00
CS
2011-12-10 13:47:36 +01:00

JSON Schema for PHP

Usage

<?php

$validator = new JsonSchema\Validator();
$result = $validator->validate(json_decode($json), json_decode($schema));

if ($result->valid) {
    echo "The supplied JSON validates against the schema.\n";
} else {
    echo "JSON does not validate. Violations:\n";
    foreach ($result->errors as $error) {
        echo "[{$error['property']}] {$error['message']}\n";
    }
}

Running the tests

$ git submodule update --init
$ phpunit
Description
No description provided
Readme MIT 3.6 MiB
Languages
PHP 100%