struct A { @ConfigProperty() int a; @ConfigProperty() float b; @ConfigProperty() string someString; } import std.stdio : writeln; import std.file : remove; auto a = A(12, 42.0, "I shall contain=====stuff .123.123.1.23."); serializeConfig(a, "test.cfg"); A test; deserializeConfig(test, "test.cfg"); assert(test.a == a.a); assert(test.b == a.b); assert(test.someString == a.someString); remove("test.cfg");
Serialize T into file path