Skip to main content

parse_bytes

Function parse_bytes 

Source
pub fn parse_bytes(
    bytes: &[u8],
    options: &Options,
) -> Result<Option<Value>, Error>
Expand description

Parse JSON bytes and apply prototype-poisoning checks.

Same as parse but takes UTF-8 bytes. A leading UTF-8 byte order mark (EF BB BF) is stripped before parsing.

ยงErrors

Returns Error::Syntax if the bytes are not valid UTF-8 JSON, or Error::ForbiddenProperty under the same rules as parse.