Function stringifyMaxDepth [src]
Alias for std.json.stringify.stringifyMaxDepth
Like stringify with configurable nesting depth.
max_depth is rounded up to the nearest multiple of 8.
Give null for max_depth to disable some safety checks and allow arbitrary nesting depth.
See writeStreamMaxDepth for more info.
Prototype
pub fn stringifyMaxDepth( value: anytype, options: StringifyOptions, out_stream: anytype, comptime max_depth: ?usize, ) @TypeOf(out_stream).Error!void
Parameters
options: StringifyOptions
max_depth: ?usize
Source
pub fn stringifyMaxDepth(
value: anytype,
options: StringifyOptions,
out_stream: anytype,
comptime max_depth: ?usize,
) @TypeOf(out_stream).Error!void {
var jw = writeStreamMaxDepth(out_stream, options, max_depth);
try jw.write(value);
}