The OpenD Programming Language

JSONValue.str

Value getter/setter for JSONType.string.

  1. string str [@property getter]
    struct JSONValue
    @property const pure @trusted return scope
    string
    str
    ()
  2. string str [@property setter]

Throws

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

Examples

JSONValue j = [ "language": "D" ];

// get value
assert(j["language"].str == "D");

// change existing key to new string
j["language"].str = "Perl";
assert(j["language"].str == "Perl");

Meta