Add JSON stringification for UUIDs
This commit is contained in:
parent
ad6f1454a6
commit
3f3e9e039e
1 changed files with 4 additions and 0 deletions
|
@ -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{
|
pub const ParseError = error{
|
||||||
InvalidCharacter,
|
InvalidCharacter,
|
||||||
InvalidLength,
|
InvalidLength,
|
||||||
|
|
Loading…
Reference in a new issue