Skip to main content

is_yaml_json_compatible

Function is_yaml_json_compatible 

Source
pub fn is_yaml_json_compatible(value: &Value) -> bool
Expand description

Check if a value is valid against the YAML 1.2 JSON-compatible schema.

Equivalent to validate_yaml_json_schema but returns a boolean. Not related to JSON Schema 2020-12 document validation.

ยงExamples

use noyalib::{is_yaml_json_compatible, Value};
assert!(is_yaml_json_compatible(&Value::from(42)));