pub const Document = struct {
revision: ??[]const u8,
description: ??[]const u8,
};
parsing the preceding results in this compile error:
/Users/haze/.cache/zig/p/1220beaae8d152baa941a10b7ef3d3a59d093b257047035e2373c3c2f876ad29ccc8/tres.zig:549:69: error: unable to evaluate comptime expression
} else if (comptime dualable(field.type) and nm == .dual) {
~~~^~~~~~~~
/Users/haze/.cache/zig/p/1220beaae8d152baa941a10b7ef3d3a59d093b257047035e2373c3c2f876ad29ccc8/tres.zig:549:66: note: operation is runtime due to this operand
} else if (comptime dualable(field.type) and nm == .dual) {
(parsed like so)
var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
defer arena.deinit();
var parser = std.json.Parser.init(arena.allocator(), false);
const tree = try parser.parse(data);
const document = try tres.parse(Document, tree.root, arena.allocator());
std.log.warn("{}", .{document});