JSONValue.objectNoRef

inout(JSONValue[string]) objectNoRef() @property inout pure @trusted

Value getter for unordered JSONType.object. Unlike object, this retrieves the object by value and can be used in @safe code.

One possible caveat is that, if the returned value is null, modifications will not be visible:

JSONValue json;
json.object = null;
json.objectNoRef["hello"] = JSONValue("world");
assert("hello" !in json.object);

Throws

JSONException for read access if type is not

JSONType.object.