Skip to main content

validate

Function validate 

Source
pub fn validate(body: &[u8]) -> Result<(), JsonError>
Expand description

Validates that body is a single well-formed JSON document (trailing whitespace allowed), allocating nothing.

ยงErrors

JsonError::Invalid if body is not valid JSON.