I'm using: https://hub.docker.com/r/gvenzl/oracle-free
The BOOLEAN type is now widely supported (yay!), e.g. this works:
select 1 = 1
I can also use BOOLEAN literals in JSON functions:
select json_array(true);
This produces:
|JSON_ARRAY(TRUE)|
|----------------|
|[true] |
But I can't use a BOOLEAN expression in JSON, it seems:
select json_array(1 = 1);
This raises an error:
SQL Error [2000] [42000]: ORA-02000: missing ) keyword
Workaround, use a subquery:
select json_array(select 1 = 1);
Same problem with this convenience syntax:
select json [ 1 = 1 ]
The error is:
SQL Error [2000] [42000]: ORA-02000: missing ] keyword
Same workaround:
select json [ select 1 = 1 from dual ]
Notice, FROM dual is needed because of https://forums.oracle.com/ords/apexds/post/json-convenience-syntax-requires-from-clause-in-subquery-6359
JSON_OBJECT is also affected. This doesn't work:
select json_object(key 'a' value 1 = 1)
This works:
select json_object(key 'a' value (select 1 = 1))