Encoder provides the method for serializing a D object into JSON format.
Encoder encoder; assert(encoder.encode(["foo":"bar"] == `{"foo":"bar"}`));
with option:
Encoder.Option opt; opt.beautify = true; opt.indentString = " "; Encoder encoder = Encoder(opt); assert(encoder.encode(["foo":"bar"] == `{ "foo": "bar" } `));
<a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
Copyright Masahiro Nakagawa 2013-.
Yajl Encoder