Method Standards.JSON.Validator()->validate_properties()
- Method
validate_properties
private
string
|zero
validate_properties(string
key
,mixed
value
,mapping
schema
)- Description
Verify that the specified value matches the specified schema. The following properties of schema are verified:
- type
If the schema has a property "type", then the value must match the specified type (see validate_item_type()).
- allOf
If the schema has a property "allOf", which is an array of schema objects, then the value must match each schema specified in that array (via another call to validate_properties()).
- anyOf
If the schema has a property "anyOf", which is an array of schema objects, then the value must match at least one schema specified in that array (via another call to validate_properties()).
- oneOf
If the schema has a property "oneOf", which is an array of schema objects, then the value must match exactly one schema specified in that array (via another call to validate_properties()).
- not
If the schema has a property "not", then the value must not match the schema specified by that property (via another call to validate_properties()).
- enum
If the schema has a property "enum", then the value must be equal to any of the values specified in the enum array.
- Note
If the schema is empty (i.e., it has none of the above specified properties, then the value is valid).