The OpenD Programming Language

JSONValue.opIndex

Array syntax for JSON arrays.

  1. inout(JSONValue) opIndex(size_t i)
    struct JSONValue
    ref inout pure @safe
    inout(JSONValue)
    opIndex
    (
    size_t i
    )
  2. inout(JSONValue) opIndex(string k)

Throws

JSONException if type is not JSONType.array.

Examples

JSONValue j = JSONValue( [42, 43, 44] );
assert( j[0].integer == 42 );
assert( j[1].integer == 43 );

Meta