Function stringifyArbitraryDepth [src]
Alias for std.json.stringify.stringifyArbitraryDepth
Like stringify but takes an allocator to facilitate safety checks while allowing arbitrary nesting depth.
These safety checks can be helpful when debugging custom jsonStringify implementations;
See WriteStream.
Prototype
pub fn stringifyArbitraryDepth( allocator: Allocator, value: anytype, options: StringifyOptions, out_stream: anytype, ) WriteStream(@TypeOf(out_stream), .checked_to_arbitrary_depth).Error!void
Parameters
allocator: Allocator
options: StringifyOptions
Source
pub fn stringifyArbitraryDepth(
allocator: Allocator,
value: anytype,
options: StringifyOptions,
out_stream: anytype,
) WriteStream(@TypeOf(out_stream), .checked_to_arbitrary_depth).Error!void {
var jw = writeStreamArbitraryDepth(allocator, out_stream, options);
defer jw.deinit();
try jw.write(value);
}