yajl.encoder

Yajl Encoder

Members

Structs

Encoder
struct Encoder

Encoder provides the method for serializing a D object into JSON format.

Examples

Encoder encoder;
assert(encoder.encode(["foo":"bar"] == `{"foo":"bar"}`));

with option:

1 Encoder.Option opt;
2 opt.beautify = true;
3 opt.indentString = "  "; 
4 Encoder encoder = Encoder(opt);
5 assert(encoder.encode(["foo":"bar"] ==
6 `{
7   "foo": "bar"
8 }
9 `));

See Also

Meta

Authors

Masahiro Nakagawa

License

<a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.