Skip to main content

validate_content

Function validate_content 

Source
pub fn validate_content(json: &str) -> ValidationResult
Expand description

Validate a content JSON string against the CDX content schema.

§Arguments

  • json - The JSON string to validate

§Returns

A vector of validation errors. An empty vector means the JSON is valid.

§Errors

Returns an error if the JSON cannot be parsed.