Function encodeJsonString [src]

Alias for std.json.stringify.encodeJsonString

Write string to writer as a JSON encoded string.

Prototype

pub fn encodeJsonString(string: []const u8, options: StringifyOptions, writer: anytype) !void

Parameters

string: []const u8options: StringifyOptions

Source

pub fn encodeJsonString(string: []const u8, options: StringifyOptions, writer: anytype) !void { try writer.writeByte('\"'); try encodeJsonStringChars(string, options, writer); try writer.writeByte('\"'); }