| author | |
| committer | |
| log | 7bc4afb1acbb58cbb3960f50a147ea8f8e4fc7f2 |
| tree | f98204b2560f1d5ce42a4d510fdae05099c77f0a |
| parent | 20dfd5a8b3781fed36dbeebfcf32bfe26f1115e6 |
| signature |
1 files changed, 3 insertions(+), 1 deletions(-)
ulid.zig+3-1| ... | ... | @@ -37,7 +37,9 @@ pub const ULID = struct { |
| 37 | 37 | |
| 38 | 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 | 44 | pub fn parse(alloc: std.mem.Allocator, value: BaseType) !ULID { |
| 43 | 45 | if (value.len != 26) return error.Ulid; |