toJSON

convert a associative array into a JSONValue object

Examples

Serialize an associative array.

auto json = ["a" : 1, "b" : 2, "c" : 3].toJSON;
assert(json.type == JSONType.object);
assert(json.object["a"].integer == 1);
assert(json.object["b"].integer == 2);
assert(json.object["c"].integer == 3);

Meta