Skip to main content

redact_value

Function redact_value 

Source
pub fn redact_value(value: &Value, policy: &RedactionPolicy) -> Value
Expand description

Apply redaction rules to a JSON value based on the given policy’s input level.

  • None: returns the value unchanged.
  • Baseline: recursively walks JSON objects and redacts values whose keys match sensitive patterns, or string values that match sensitive value prefixes; remaining string leaves are scanned by RedactionPolicy::detector.
  • Full: returns json!("[REDACTED]").