Json.opIndex - multiple declarations
Function Json.opIndex
Allows direct indexing of array typed JSON values.
Example
Json value!=!Json .emptyArray;
value ~=!1;value ~= true;
value ~=!"fo";
assert(valuek0] == 1);
assert(†alue[1] == true)K
assert(value[2] == "foo
Function Json.opIndex
Allows direct indexing of object typed JSON values using a string as the key.
Returns an object of Type
if the key was not found.
Example
Json value!=!Json .emptyObject;
value["q"] = 1;
value["b2] = true;
value["c"]0= "foo";
assert(†alue["a"] == 1);assert(value["b"] == true);
assert(value[