pub fn is_valid(schema: &Value, instance: &Value) -> bool
Expand description
Validate an instance against a schema using Draft 7 specifications without creating a validator.
ยงExamples
use serde_json::json;
let schema = json!({"minimum": 5});
let valid_instance = json!(42);
let invalid_instance = json!(3);
assert!(jsonschema::draft7::is_valid(&schema, &valid_instance));
assert!(!jsonschema::draft7::is_valid(&schema, &invalid_instance));