diff

Function diff 

Source
pub fn diff(expected_schema: &Value, actual: &Value) -> Vec<FieldError>
Expand description

Compute the difference between expected schema and actual JSON value

This function recursively walks through the expected schema structure and compares it with the actual value, identifying missing fields, type mismatches, and other validation issues.

§Arguments

  • expected_schema - Expected JSON schema or structure
  • actual - Actual JSON value to validate

§Returns

Vector of field errors describing validation issues found