The safety_checks_hint parameter determines how much memory is used to enable assertions that the above grammar is being followed,
e.g. tripping an assertion rather than allowing endObject to emit the final } in [[[]]}.
"Depth" in this context means the depth of nested [] or {} expressions
(or equivalently the amount of recursion on the <value> grammar expression above).
For example, emitting the JSON [[[]]] requires a depth of 3.
If .checked_to_fixed_depth is used, there is additionally an assertion that the nesting depth never exceeds the given limit.
.checked_to_fixed_depth embeds the storage required in the Stringify struct.
.assumed_correct requires no space and performs none of these assertions.
In fast and small optimization modes, the given safety_checks_hint is ignored and is always treated as .assumed_correct.
const safety_checks_hint: union(enum)
const safety_checks_hint: union(enum) {
/// Rounded up to the nearest multiple of 8.
checked_to_fixed_depth: usize,
assumed_correct,
} = .{ .checked_to_fixed_depth = 256 }