Skip to main content

find_blocked_fields_in_output

Function find_blocked_fields_in_output 

Source
pub fn find_blocked_fields_in_output(
    value: &Value,
    blocked_fields: &HashSet<String>,
) -> Vec<String>
Expand description

Find blocked fields that appear in a JSON value (output validation).

Unlike filter_blocked_fields which silently removes fields, this function identifies blocked fields without modifying the value. Used for output blocklist validation where blocked fields can be used internally but cannot appear in script output.

§Arguments

  • value - The JSON value to check
  • blocked_fields - Set of field names that are not allowed in output

§Returns

A vector of blocked field names found in the value, along with their paths.