authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-20 03:36:17 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-20 03:36:17 -07:00
log78fa299e3169be7d30fdffec528b27fabab90928
treea2018b7277a1fcfd8e669775bc9775a2860899df
parent8c0042bd1698f01d83dbddd65a75850090fdb577
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add stringifyJson


1 files changed, 4 insertions(+), 0 deletions(-)

ulid.zig+4
...@@ -71,4 +71,8 @@ pub const ULID = struct {...@@ -71,4 +71,8 @@ pub const ULID = struct {
71 pub fn nprint(self: ULID, writer: anytype) !void {71 pub fn nprint(self: ULID, writer: anytype) !void {
72 try writer.writeAll(&self.bytes());72 try writer.writeAll(&self.bytes());
73 }73 }
74
75 pub fn stringifyJson(self: ULID, writer: anytype, options: std.json.Stringify.Options, json: type) !void {
76 return json.stringify(writer, &self.bytes(), options);
77 }
74};78};