Skip to main content

sanitize_json

Function sanitize_json 

Source
pub fn sanitize_json(body: &str) -> Cow<'_, str>
Expand description

Replace the bare tokens NaN, Infinity and -Infinity outside strings with null, so serde_json accepts the body. Borrowed when there are none.