I'm using: https://hub.docker.com/r/gvenzl/oracle-free
This syntax works:
select json_array(select 1)
But this doesn't:
select json [ select 1 ]
It fails with:
SQL Error [923] [42000]: ORA-00923: FROM keyword not found where expected
The workaround is to add FROM dual again in the subquery:
select json [ select 1 from dual ]
I'd say this is a bug?