Hi,
I need some help with this. It seems like serialization to/from BSON is not properly initializing the variant..
@("serialization") unittest {
import unit_threaded;
Variant[string] d0;
d0["t1"] = Variant("hallo");
trace(d0);
Bson coded = d0.serializeToBson();
Variant[string] d1;
d1 = coded.deserializeBson!(Variant[string]);
trace(d1);
d1["t1"].get!string.shouldEqual("hello");
}
this code produces (from the trace statements)
source/msg.d:98 - ["t1":hallo]
source/msg.d:104 - ["t1":<Uninitialized VariantN>]
msg.serialization:
std.variant.VariantException@std/variant.d(1457): Attempt to use an uninitialized VariantN
I am blocked on this now. Please help