Cannot serialize Duration
fyfrey opened this issue · 0 comments
fyfrey commented
Hi,
asdf fails to serialize a struct with phobos Duration in it:
/+dub.sdl:
dependency "asdf" version="~>0.5.7"
+/
import std.stdio;
import std.datetime;
import asdf;
void main()
{
A a;
string json = serializeToJsonPretty(a); // never ends
writeln("json length ", json.length);
}
struct A
{
Duration dur;
}This errors with an OOM exception in the appender. Somehow in writes never-ending zero": { strings to it.