Skip to main content

ascii

Function ascii 

Source
pub fn ascii(json: &str) -> String
Expand description

JSON text in ASCII: every character outside it written as its \u escape, a character past U+FFFF as its UTF-16 surrogate pair (RFC 8259, section 7), so · (U+00B7) becomes \u00b7. The product system’s data.md asks JSON to be ASCII (Copying and typing numbers). A reader gets back the same strings: outside a string JSON text is ASCII already, and inside one an escape stands for its character.