Skip to Main Content

Oracle Database Free

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSON boolean to number is broken since v21

Michal VorisekSep 14 2025

Here is a working repro case https://dbfiddle.uk/Mw3hvXLt for v18.

Since v21, the repro case is broken and “null” instead of 0/1 is parsed instead - repro https://dbfiddle.uk/6OpztDVz .

I belive this is a bug because of these facts:

  • it was working prior v21 release
  • boolean to number parsed as “null” is way worse than meaningful 0/1
  • since v21 release there is “ALLOW BOOLEAN TO NUMBER” grammar for this, but it outputs: ORA-40798: Boolean conversion not supported for data type

Expected fix/behaviour:

  • “NUMBER(1)” column type working for parsing of false/true/null from JSON with expected result 0/1/null
  • “ALLOW BOOLEAN TO NUMBER” column type working for parsing of false/true/null from JSON with expected result 0/1/null
Comments
Post Details
Added on Sep 14 2025
2 comments
47 views