SCHEMA_MEDIA_TYPE
SCHEMA_MEDIA_TYPE = 'application/schema+json'
A JsonSchema Constraint
$factory : \JsonSchema\Constraints\Factory
__construct(\JsonSchema\Constraints\Factory $factory = null)
\JsonSchema\Constraints\Factory | $factory |
addError(\JsonSchema\Entity\JsonPointer $path = null, $message, $constraint = '', array $more = null)
\JsonSchema\Entity\JsonPointer | $path | |
$message | ||
$constraint | ||
array | $more |
validate( $value, $schema = null, $checkMode = null)
Validates the given data against the schema and returns an object containing the results Both the php object and the schema are supposed to be a result of a json_decode call.
The validation works as defined by the schema proposal in http://json-schema.org.
Note that the first argument is passwd by reference, so you must pass in a variable.
{@inheritdoc}
$value | ||
$schema | ||
$checkMode |