The function json_value
got a new clause [ TYPE { STRICT | LAX } ]
in 23c (was not documented in 21c/19c).
Here's the syntax diagram for json_value
according https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/JSON_VALUE.html#GUID-C7F19D36-1E75-4CB2-AE67-ADFBAD23CBC2

The following works in my 23.3 instance:
select json_value('{a:100}', '$.a');
However, when I add the new clauses like this
select json_value('{a:100}', '$.a' type strict);
I get the following error message
Error starting at line : 1 in command -
select json_value('{a:100}', '$.a' type strict)
Error at Command Line : 1 Column : 41
Error report -
SQL Error: ORA-00906: missing left parenthesis
00906. 00000 - "missing left parenthesis"
*Cause: A required left parenthesis has been omitted. Certain
commands, such as CREATE TABLE, CREATE CLUSTER, and INSERT,
require a list of items enclosed in parentheses. Parentheses
also are required around subqueries in WHERE clauses and in
UPDATE table SET column = (SELECT...) statements.
*Action: Correct the syntax, inserting a left parenthesis where
required, and retry the statement.
More Details :
https://docs.oracle.com/error-help/db/ora-00906/
I get a similar message with lax
instead of strict
.
I have the same issues with the functions json_query
, json_table
and json_transform
. This newly documented clause does not work there either.
Is this a documentation bug or is this something to be implemented in 23.4? If it should work in 23.3, can anyone provide a working example, please?
TIA