JSONValue.orderedObject

Value getter/setter for ordered JSONType.object.

  1. inout(OrderedObjectMember[]) orderedObject [@property getter]
    struct JSONValue
    @property ref inout pure @system return
    inout(OrderedObjectMember[])
    orderedObject
    ()
  2. OrderedObjectMember[] orderedObject [@property setter]

Throws

JSONException for read access if type is not JSONType.object or the object is unordered. Note: This is @system because of the following pattern:

auto a = &(json.orderedObject());
json.uinteger = 0;        // overwrite AA pointer
(*a)["hello"] = "world";  // segmentation fault

Meta