Skip to main content

parse_jsonld_acl_with_limits

Function parse_jsonld_acl_with_limits 

Source
pub fn parse_jsonld_acl_with_limits(
    body: &[u8],
    max_bytes: usize,
    max_depth: usize,
) -> Result<AclDocument, PodError>
Expand description

Parse a JSON-LD ACL body with caller-supplied byte and depth limits.

Equivalent to parse_jsonld_acl but accepts limits as parameters instead of reading from environment variables. Returns PodError::PayloadTooLarge (HTTP 413 equivalent) when body.len() > max_bytes.