- .nil => "nil",
- .boolean => |boolean| if (boolean) "true" else "false",
- .string => |string| string,
- .number => |number| try std.fmt.allocPrint(allocator, "{}", .{number}),
+ .string => |string| allocator.dupe(u8, string),
+ .number => |number| std.fmt.allocPrint(allocator, "{}", .{number}),
+ .boolean => |boolean| std.fmt.allocPrint(allocator, "{}", .{boolean}),
+ .nil => allocator.dupe(u8, "nil"),