pub fn validate_json<T: Into<DatasetInput>>(
dataset: T,
model: &DataModel,
root: Option<String>,
) -> Result<Vec<ValidationError>, Box<dyn Error>>
Expand description
Validates a dataset against a given DataModel.
§Arguments
dataset
- The dataset to validate, which can be provided in various forms.model
- A reference to the DataModel against which the dataset will be validated.root
- An optional root path for the schema.
§Returns
A Result containing a vector of ValidationErrors if validation fails, or an empty vector if successful.