diff --git a/core/json/mod.rs b/core/json/mod.rs index 4d972c150..cdb1d8ed6 100644 --- a/core/json/mod.rs +++ b/core/json/mod.rs @@ -685,7 +685,7 @@ pub fn json_quote(value: &OwnedValue) -> crate::Result { return Ok(value.to_owned()); } - let mut escaped_value = String::with_capacity(t.value.len()); + let mut escaped_value = String::with_capacity(t.value.len() + 4); escaped_value.push('"'); for c in t.value.to_string_lossy().chars() { match c {