JSON_BEHAVIOR

JSON_BEHAVIOR allows you to specify various default behaviors, at the session level, for certain SQL/JSON functions and conditions.

Property Description
Parameter type String
Syntax

JSON_BEHAVIOR = "flag:value[;flag:value]..."

There must be no spaces inside of the double quotation marks.

Default value None
Modifiable ALTER SESSION
Modifiable in a PDB No
Basic No

This parameter allows you to change the default return data type, default type-compatibility, and default error behavior during a session for certain SQL/JSON functions and conditions. This lets you enforce consistent session-level JSON processing behavior, reducing the need for explicit overriding of default behaviors within individual SQL statements.

For example, by default, the JSON_QUERY function uses lax type-compatibility when comparing data. You can use this parameter to specify that all invocations of the JSON_QUERY function in a session use strict type-compatibility, by default.

You can specify one or more of the following flags, in any order:

Examples

ALTER SESSION SET JSON_BEHAVIOR = "ON_ERROR:ERROR";

ALTER SESSION SET JSON_BEHAVIOR = "LAX_JSON_QUERY:FALSE;LAX_JSON_TABLE:FALSE;LAX_JSON_VALUE:FALSE";

Note: This parameter is available starting with Oracle AI Database 26ai.

See Also: Oracle AI Database SQL Language Reference for more information about the JSON_QUERY, JSON_TABLE, and JSON_VALUE functions, and the JSON_EXISTS condition