Hey,
pretty much new to Zig. Excited to be here and grateful for all the hard work done on this amazing language!
I am trying to familiarize myself with the std.json API, since I intend on creating a json schema validator in zig.
By doing so I triggered a segfault with the following example code:
const res = try std.json.parseFromSlice(std.json.Value, gpa, "{ \"type\": \"number\", \"value\": 69 }", .{});
res.deinit();
switch (res.value) {
.object => |map| {
const ty = map.get("type");
std.debug.print("{any}\n", .{ty});
},
else => {},
}
My debugging capabilities are very limited and I am probably doing something wrong here. So before doing a bug report I wanted to understand the issue better or even ask for any hints.
Thanks in advance!
PS.
I am running zig 16.0 aarch64 in debug mode on a mac.