JSONValue.objectNoRef

Value getter for 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);
struct JSONValue
@property inout pure @trusted
inout(JSONValue[string])
objectNoRef
()

Throws

JSONException for read access if type is not JSONType.object.

Meta