oa_gateway_uci

Constant MAX_DEPTH

Source
pub const MAX_DEPTH: usize = 96;
Expand description

Deepest element nesting accepted when converting a payload.

Conversion walks a document recursively, so nesting is a stack-depth question: unbounded, a document deep enough ends the process rather than the message.

The number is bracketed rather than chosen. SystemReadiness, the deepest message in the published catalog, declares 39 levels — so a limit anywhere near that would refuse real traffic, and the ignored published_schema test re-measures it against whatever schema you compile. serde_json refuses at 128 nested values on its own, so a limit above that would leave JSON and XML failing at two different depths for the same payload. This sits between the two, with room over the catalog and none borrowed from serde_json.