Converts recursive directory listing to an array or json object.