Search notes:

ORA-40573: invalid use of PL/SQL JSON object type

This statement throws ORA-40573: invalid use of PL/SQL JSON object type:
select
   json_array_t(json_arrayagg(column_name))
from
   dba_tab_cols
where
   owner      = 'SYS'                   and
   table_name = 'USER_TAB_COMMENTS'
;
So does this statement:
select
   json_array_t('["TABLE_NAME","TABLE_TYPE","COMMENTS","ORIGIN_CON_ID"]')
from
   dual;
The following PL/SQL block runs fine, however:
declare
   a json_array_t;
begin
   a := json_array_t('["TABLE_NAME","TABLE_TYPE","COMMENTS","ORIGIN_CON_ID"]');
end;
/ 
My assumption (!) is that this error is thrown in SQL because json_object_t is not a persistable type.

See also

ORA-40587: invalid JSON type
JSON related PL/SQL object types and select … into such a type.
Other Oracle error messages

Index