| ... | @@ -497,3 +497,8 @@ pub fn assertLog(ok: bool, message: string) void { | ... | @@ -497,3 +497,8 @@ pub fn assertLog(ok: bool, message: string) void { |
| 497 | if (!ok) std.log.err("assertion failure: {s}", .{message}); | 497 | if (!ok) std.log.err("assertion failure: {s}", .{message}); |
| 498 | if (!ok) unreachable; // assertion failure | 498 | if (!ok) unreachable; // assertion failure |
| 499 | } | 499 | } |
| | 500 | |
| | 501 | pub fn parse_json(alloc: std.mem.Allocator, input: string) !std.json.ValueTree { |
| | 502 | var p = std.json.Parser.init(alloc, .alloc_always); |
| | 503 | return try p.parse(input); |
| | 504 | } |