From 27dd9c8d9e35e88225ac91052b94cba43d185aba Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 27 Feb 2022 15:50:27 -0800 Subject: [PATCH] add jsonStringify support --- ulid.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ulid.zig b/ulid.zig index f97eedd518fc1044b04c88f5c27c5fc64d9aa792..848c07020822bfd83869d0b98b07aebe697c0686 100644 --- a/ulid.zig +++ b/ulid.zig @@ -36,6 +36,8 @@ pub const ULID = struct { pub const BaseType = string; + usingnamespace extras.StringerJsonStringifyMixin(@This()); + pub fn parse(alloc: std.mem.Allocator, value: BaseType) !ULID { if (value.len != 26) return error.Ulid; return ULID{ -- 2.54.0