Feature request: format character 'a' to return arrays from json_unpack
Currently I'm writing lots of code that looks like this: if (json_unpack(input, "{so!}", "some_array", &the_array) == -1 || !json_is_array(the_array)) { /* error handling code */ }
I would like to be able to use 'a' in place of the 'o' and not have to check if the returned json_t is an array or not.
Sounds like a sensible idea. But if a format character for array is added, one should also be added for object, and both "o" and "O" are already taken :(
I would also like to ask for implementing this feature... with "objects in objects" I can already do this with nested curly brackets, e.g. "{ss s{ss}}", but this is not possible for arrays with an unknown length (which are quite common). There normally is no "variable length object" (object with an unknown number of keys).