diff options
| author | May B <shu@3hg.fr> | 2022-06-29 11:53:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-29 11:53:01 +0200 |
| commit | ea13437ac575329f1198f8422b856ebfcadff4c8 (patch) | |
| tree | 458d7bd292406beebafd6b46dc25d340ba538020 /lib/std/json/write_stream.zig | |
| parent | 4a6b70fbd1e8f6de25ae00c16051aa9613d8a7bc (diff) | |
| download | zig-ea13437ac575329f1198f8422b856ebfcadff4c8.tar.gz zig-ea13437ac575329f1198f8422b856ebfcadff4c8.zip | |
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
Diffstat (limited to 'lib/std/json/write_stream.zig')
| -rw-r--r-- | lib/std/json/write_stream.zig | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/std/json/write_stream.zig b/lib/std/json/write_stream.zig index 3393f8a6ee..298f640856 100644 --- a/lib/std/json/write_stream.zig +++ b/lib/std/json/write_stream.zig @@ -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); } |
