Skip to main content

patch

Function patch 

Source
pub fn patch(text: &str, next: &Value) -> String
Expand description

text changed to hold next, the rest as it was. Maps and lists are edited entry by entry (a kept entry keeps the comments before it; a removed one takes them along). Text that doesn’t parse is written anew.