std.json: Support disabling indent (#11823)
Newline Delimited JSON (ndjson) expect compact json without newline inside its content Add None to StringfyOptions.indent and move newline writeByte inside StringfyOptions.outputIndent
This commit is contained in:
@@ -202,7 +202,6 @@ pub fn WriteStream(comptime OutStream: type, comptime max_depth: usize) type {
|
||||
|
||||
fn indent(self: *Self) !void {
|
||||
assert(self.state_index >= 1);
|
||||
try self.stream.writeByte('\n');
|
||||
try self.whitespace.outputIndent(self.stream);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user