D program:
import std.stdio;
import configy.read;
void main()
{
struct C { string[] countries; }
auto c = parseConfigFileSimple!C("test.yaml");
writeln(c.get());
}
YAML:
countries:
- UK
- NO
- US
Expected output:
Actual output:
Because we know we're deserialising into a string, we should capture the original token and then parse that as needed depending on the desired type, instead of eagerly converting to bool and then stringifying it.
D program:
YAML:
Expected output:
Actual output:
Because we know we're deserialising into a
string, we should capture the original token and then parse that as needed depending on the desired type, instead of eagerly converting tobooland then stringifying it.