pub fn add_attribute( document: &mut Value, types: &[&str], attribute: &str, value: impl Fn(&Map<String, Value>) -> Value, )
Adds an attribute where it is missing, such as one a newer version removed.