If you are using DMD2.065+, you change JSONValue directly without setting the type. This change was made to provide a memory safe API. Example:
import std.json, std.stdio;
void main() {
JSONValue nJ = 5;
JSONValue sJ = "hello";
JSONValue bJ = true;
JSONValue aJ = [1, 2];
JSONValue oJ1 = ["i": JSONValue(2), "s": JSONValue("str"), "arr": JSONValue([1, 2, 3])]; // different value types
JSONValue oJ2 = ["a": 1, "b": 2, "c": 3]; // same value type
writeln(nJ.toString());
writeln(sJ.toString());
writeln(bJ.toString());
writeln(aJ.toString());
writeln(oJ1.toString());
writeln(oJ2.toString());
}