struct A { @ConfigProperty("kek") int a; @ConfigProperty() float b; string c; } import std.file : write, remove; write("test.cfg", "#this is a comment\r\nkek = 42\r\nb=12.0\r\n"); A a = A(42, 12.0, "test"); deserializeConfig(a, "test.cfg"); assert(a.a == 42); assert(a.b == 12.0); assert(a.c == "test"); remove("test.cfg");
Deserialize T from file path