const std = @import("std");
const t = @import("./generated/mod.zig");

var mygpa = std.heap.GeneralPurposeAllocator(.{}){};
const gpa = mygpa.allocator();

const payload =
    \\{ 
    \\  "val_number": 0.12, 
    \\  "val_boolean": true,
    \\  "val_string": "Hallo Welt"
    \\}
;

pub fn main() !void {
    var stream = std.json.TokenStream.init(payload);
    const res = std.json.parse(t.TestAtom, &stream, .{ .allocator = gpa }) catch unreachable;

    std.log.info("{} {s}", .{ res, res.val_string });
}
