JSONException if there's a type mismatch or syntax error.
auto text = q{ [1, 2, 3] }; { auto json = JSONParser(text); auto values = json.getArray!(uint[3]); static assert(is(typeof(values) == uint[3])); assert(values == [1, 2, 3]); } { auto json = JSONParser(text); auto values = json.getArray!(uint, 3); static assert(is(typeof(values) == uint[3])); assert(values == [1, 2, 3]); }
Get a static array of elements matching the type.