| ... | @@ -37,7 +37,9 @@ pub const ULID = struct { | ... | @@ -37,7 +37,9 @@ pub const ULID = struct { |
| 37 | | 37 | |
| 38 | pub const BaseType = string; | 38 | pub const BaseType = string; |
| 39 | | 39 | |
| 40 | usingnamespace extras.StringerJsonStringifyMixin(@This()); | 40 | pub fn jsonStringify(self: @This(), json_stream: anytype) !void { |
| | 41 | try json_stream.write(&self.bytes()); |
| | 42 | } |
| 41 | | 43 | |
| 42 | pub fn parse(alloc: std.mem.Allocator, value: BaseType) !ULID { | 44 | pub fn parse(alloc: std.mem.Allocator, value: BaseType) !ULID { |
| 43 | if (value.len != 26) return error.Ulid; | 45 | if (value.len != 26) return error.Ulid; |