Skip to main content

set_scalar_preserving

Function set_scalar_preserving 

Source
pub fn set_scalar_preserving(
    content: &str,
    path: &str,
    value: &Value,
) -> DocumentResult<String>
Expand description

Replace one existing JSON scalar while retaining every byte outside its value span. JSON has no comments, but this still preserves key order, whitespace, line endings, escapes, and untouched number spellings.