json_arrayagg
cannot be used in a PL/SQL select … into
clause to create a json_array_t
or json_object_t
instance. clob
and then the desired type be created: declare res_clb clob; res_typ json_array_t; begin select json_arrayagg(json_array(column_name, data_type)) into res_clb from all_tab_columns where table_name = 'USER_TAB_COLUMNS' ; res_typ := json_array_t.parse(res_clb); dbms_output.put_line(res_typ.to_string); end; /