JSONValue.str

Value getter/setter for JSONType.string.

  1. string str [@property getter]
  2. string str [@property setter]
    struct JSONValue
    @property pure nothrow @nogc @trusted return
    string
    str
    (
    return string v
    )

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