Skip to main content

leading_json

Function leading_json 

Source
pub(crate) fn leading_json<T>(bytes: &[u8]) -> Result<T>
where T: for<'de> Deserialize<'de>,
Expand description

Decodes the JSON object a stored row holds, as a release build’s database decoder reads it.

That decoder parses the object at the start of the leading record and, in either build, ignores whatever follows the object within that record. A release build also ignores any further record, where a debug build panics on one beyond a single trailing separator.