Add JSON stringification for UUIDs

This commit is contained in:
jaina heartles 2022-07-12 21:23:50 -07:00
parent ad6f1454a6
commit 3f3e9e039e

View file

@ -33,6 +33,10 @@ pub fn format(value: Uuid, comptime _: []const u8, _: std.fmt.FormatOptions, wri
});
}
pub fn jsonStringify(value: Uuid, _: std.json.StringifyOptions, writer: anytype) !void {
try std.fmt.format(writer, "\"{}\"", .{value});
}
pub const ParseError = error{
InvalidCharacter,
InvalidLength,