Skip to main content

RAW_MARKER

Constant RAW_MARKER 

Source
pub const RAW_MARKER: char = '\u{0}';
Expand description

Marker prefix for a value that must be emitted verbatim, unquoted.

Python writes non-finite floats as the bare tokens NaN, Infinity and -Infinity. JSON has no syntax for them and serde_json::Number cannot hold them, so they travel as strings carrying this prefix. A NUL cannot occur in the data this serializes, which is what makes it safe as a sentinel.