Skip to main content

json_stringify_str

Function json_stringify_str 

Source
pub fn json_stringify_str(s: &str) -> String
Expand description

JSON-stringify a string value using SIMD-accelerated escaping.

This is a faster alternative to serde_json::to_string(s) for &str inputs. The output includes surrounding double quotes, e.g. json_stringify_str("hello") returns "\"hello\"".