The OpenD Programming Language

JSONValue.opIndex

Hash syntax for JSON objects.

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

Throws

JSONException if type is not JSONType.object.

Examples

JSONValue j = JSONValue( ["language": "D"] );
assert( j["language"].str == "D" );

Meta