Zig's std.json.Parsed(T)

from blog openmymind.net, | ↗ original
When parsing JSON using one of Zig's std.json.parseFrom* functions, you'll have to deal with the return type: an std.json.Parsed(T): const file = try std.fs.openFileAbsolute(file_path, .{}); defer file.close(); var buffered = std.io.bufferedReader(file.reader()); var reader = std.json.reader(allocator, buffered.reader()); defer reader.deinit();...