Skip to main content

decode_json

Function decode_json 

Source
pub fn decode_json(
    payload: &[u8],
    limits: &DecodeLimits,
) -> Result<Value, FaultReason>
Expand description

Decode a JSON payload within limits. The depth is checked by a scan over the raw bytes before any value is built, so a hostile payload cannot make the parser recurse or allocate past the limit.