aboutsummaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fs.zig b/src/fs.zig
index 77e85dcac..7dbcc4f40 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -970,6 +970,10 @@ pub const Path = struct {
name: PathName,
is_disabled: bool = false,
+ pub fn jsonStringify(self: *const @This(), options: anytype, writer: anytype) !void {
+ return try std.json.stringify(self.text, options, writer);
+ }
+
pub fn generateKey(p: *Path, allocator: *std.mem.Allocator) !string {
return try std.fmt.allocPrint(allocator, "{s}://{s}", .{ p.namespace, p.text });
}