pub fn validate(
    instance: &Value,
    schema: &Value,
    draft: Option<&schemas::Draft>,
    validate_schema: bool,
) -> error::ValidationErrors {
    let mut errors = error::ValidationErrors::new();
    config::Config::from_schema(schema, draft)
        .unwrap()
        .validate(instance, schema, &mut errors, validate_schema);
    errors
}
/// Validates a given JSON instance against a given JSON schema, returning the
/// errors, if any. draft may provide the schema draft to use. If not provided,
/// it will be determined automatically from the schema.
///
/// # Arguments
///
/// * `instance`: The JSON document to validate
/// * `schema`: The JSON schema to validate against
/// * `draft`: The draft of the JSON schema specification to use. If `None`, the
///   draft will be automatically determined from the `schema`.
/// * `validate_schema`: When `true`, validate the schema against the metaschema
///   first.
///
/// # Returns
///
/// * `errors`: A vector of `ValidationError` found during validation.
Validates a given JSON instance against a given JSON schema, returning the
errors, if any. draft may provide the schema draft to use. If not provided,
it will be determined automatically from the schema.
Validates a given JSON instance against a given JSON schema returning the errors if any . draft may provide the schema draft to use . If not provided it will be determined automatically from the schema .
pub fn validate(
    instance: &Value,
    schema: &Value,
    draft: Option<&schemas::Draft>,
    validate_schema: bool,
) -> error::ValidationErrors {
    let mut errors = error::ValidationErrors::new();
    config::Config::from_schema(schema, draft)
        .unwrap()
        .validate(instance, schema, &mut errors, validate_schema);
    errors
}
pub fn validate ( instance : & Value , schema : & Value , draft : Option < & schemas :: Draft > , validate_schema : bool , ) -> error :: ValidationErrors { let mut errors = error :: ValidationErrors :: new ( ) ; config :: Config :: from_schema ( schema , draft ) . unwrap ( ) . validate ( instance , schema , & mut errors , validate_schema ) ; errors }
Validates a given JSON instance against a given JSON schema, returning the
errors, if any.
Validates a given JSON instance against a given JSON schema returning the errors if any .
instance
&Value
schema
&Value
draft
Option<&schemas::Draft>
validate_schema
bool
`errors`: A vector of `ValidationError` found during validation.
` errors ` : A vector of ` ValidationError ` found during validation .
instance
&Value
schema
&Value
draft
Option<&schemas::Draft>
validate_schema
bool