Target type. can be any primitive/builtin D type, or any user-defined type using the JsonizeMe mixin.
JSONValue to deserialize.
key of desired value within the object.
value to return if key is not found
configures the deserialization behavior.
Substitute default values when keys aren't present.
auto aa = ["a": 1, "b": 2]; auto json = JSONValue(aa); assert(json.fromJSON!int("a", 7) == 1); assert(json.fromJSON!int("c", 7) == 7);
Extract a value from a json object by its key.
Throws if json is not of JSONType.object. Return defaultVal if the key does not exist.