pub fn json_depth(v: &Value) -> usize
Container-nesting depth of a JSON value: scalars are 0, an array/object is 1 + its deepest child. (Recursion here is bounded by serde_json’s own 128-level parse limit.)