pub fn set_preserving(
content: &str,
path: &str,
value: &Value,
) -> DocumentResult<String>Expand description
Set a JSON value at path while retaining every byte outside the edited
region. JSON has no comments, but this still preserves key order,
whitespace, line endings, escapes, and untouched number spellings.
Matches the in-memory crate::document::set_path capability:
- an existing value (scalar or collection) is replaced in place;
- a missing leaf, and any missing intermediate parent objects, are created under the deepest existing ancestor object.