pub(crate) fn apply_app_config_to_yaml(
text: &str,
target: &Value,
) -> Result<String>Expand description
Apply target onto the original app YAML text, preserving the formatting
of everything that did not change.
- A node is rewritten only when its value differs from
target; comments, order, blank lines and quoting are otherwise untouched. - Top-level keys are synced (added, updated, or removed); nested mappings are
merged without removing keys. See
merge_into_mappingfor why. - A
nullintargetis never added (avoidsname: nullnoise); an existing key can still be set to it.
When the edit cannot be format-preserved (a structured value changed,
see set_value) or its output does not reparse, falls back to a plain
serialization of target.