aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jv/stringify.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/jv/stringify.zig')
-rw-r--r--src/jv/stringify.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jv/stringify.zig b/src/jv/stringify.zig
new file mode 100644
index 0000000..341fed3
--- /dev/null
+++ b/src/jv/stringify.zig
@@ -0,0 +1,6 @@
+const std = @import("std");
+const Value = @import("./value.zig").Value;
+
+pub fn stringify(allocator: std.mem.Allocator, value: Value) ![]u8 {
+ return try std.json.Stringify.valueAlloc(allocator, value, .{});
+}