pub fn validate_to_stream(
    stream: &mut Write,
    instance: &Value,
    schema: &Value,
    draft: Option<&schemas::Draft>,
    validate_schema: bool,
) -> Option<()> {
    let mut errors = error::ErrorRecorderStream::new(stream);
    config::Config::from_schema(schema, draft)
        .unwrap()
        .validate(instance, schema, &mut errors, validate_schema)
}
/// Validates a given JSON instance against a given JSON schema, writing the
/// errors to the given stream. draft may provide the schema draft to use. If
/// not provided, it will be determined automatically from the schema.
///
/// # Arguments
///
/// * `stream`: An object to write errors to.
/// * `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
///
/// * `Some(())`: No errors were found.
/// * `None`: At least one error was found.
Validates a given JSON instance against a given JSON schema, writing the
errors to the given stream. 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 writing the errors to the given stream . draft may provide the schema draft to use . If not provided it will be determined automatically from the schema .
pub fn validate_to_stream(
    stream: &mut Write,
    instance: &Value,
    schema: &Value,
    draft: Option<&schemas::Draft>,
    validate_schema: bool,
) -> Option<()> {
    let mut errors = error::ErrorRecorderStream::new(stream);
    config::Config::from_schema(schema, draft)
        .unwrap()
        .validate(instance, schema, &mut errors, validate_schema)
}
pub fn validate_to_stream ( stream : & mut Write , instance : & Value , schema : & Value , draft : Option < & schemas :: Draft > , validate_schema : bool , ) -> Option < ( ) > { let mut errors = error :: ErrorRecorderStream :: new ( stream ) ; config :: Config :: from_schema ( schema , draft ) . unwrap ( ) . validate ( instance , schema , & mut errors , validate_schema ) }
Validates a given JSON instance against a given JSON schema, writing the
errors to the given stream.
Validates a given JSON instance against a given JSON schema writing the errors to the given stream .
stream
&mut Write
instance
&Value
schema
&Value
draft
Option<&schemas::Draft>
validate_schema
bool
`Some(())`: No errors were found.
`None`: At least one error was found.
` Some (( )) ` : No errors were found . ` None ` : At least one error was found .
stream
&mut Write
instance
&Value
schema
&Value
draft
Option<&schemas::Draft>
validate_schema
bool