Skip to main content

MAX_DEPTH

Constant MAX_DEPTH 

Source
pub const MAX_DEPTH: usize = 1000;
Expand description

How many nested containers a document may carry, matching the reference reader’s own ceiling (MAX_DEPTH in packages/ir/src/codec/json/value.ts) and the YAML reader’s crate::ir::yaml::MAX_DEPTH.

A reader that follows arbitrary nesting turns a small input into a deep recursion, so the profile puts a ceiling on it and reports nesting_too_deep rather than failing some other way at some other depth.