Function fromJson
Converts a json value to a string[], string or uint setting field
T fromJson(T)(
JSONValue value
);
Example
fromJson returns ["tap", "xunit"] for a json string array
fromJson!(string[])(parseJSON(`["tap", "xunit"]`)) .should .equal(["tap", "xunit"]);
Example
fromJson returns "parallel" for a json string
fromJson!string(parseJSON(`"parallel"`)) .should .equal("parallel");
Example
fromJson returns 4 for a json integer read as uint
fromJson!uint(parseJSON(`4`)) .should .equal(4u);