Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

beginWriteRaw

Public Function
std.json.Stringify.beginWriteRaw
pub fn beginWriteRaw(self: *Stringify) !void

An alternative to calling write that allows you to write directly to the .writer field, e.g. with .writer.writeAll(). Call beginWriteRaw(), then write a complete value (including any quotes if necessary) directly to the .writer field, then call endWriteRaw(). This can be useful for streaming very long strings into the output without needing it all buffered in memory.

Params

File

json/Stringify.zig:258
258
259
260
261
262
263
264
pub fn beginWriteRaw(self: *Stringify) !void {
    if (build_mode_has_safety) {
        assert(self.raw_streaming_mode == .none);
        self.raw_streaming_mode = .value;
    }
    try self.valueStart();
}