t { auto compound = new Compound(); compound["a"] = 44; assert(toJSON(compound) == JSONValue(["a": 44])); assert(toJSON(new Int(12)) == JSONValue(12)); assert(toJSON(new ListOf!Int(9, 10)) == JSONValue([9, 10])); assert(toJSON(null).type == JSON_TYPE.NULL);
Converts a Tag into a JSONValue.