Skip to main content

MAX_NESTING_DEPTH

Constant MAX_NESTING_DEPTH 

Source
pub const MAX_NESTING_DEPTH: usize = 128;
Expand description

Maximum array/object nesting depth accepted by canonicalize_trusted_json_value.

Defense in depth: serde_json’s parser already caps nesting, but a caller may hand in a Value built by other means, so canonicalization enforces its own bound rather than trusting the input’s provenance.