2.12.3 JavaScript Object Notation (JSON) Known Bugs
These are known bugs for JavaScript Object Notation (JSON) in Oracle Database 12c Release 2 (12.2).
2.12.3.1 Bug 25186856
LOB
input parameters and LOB
outputs for JavaScript Object Notation (JSON) generation functions (for example, JSON_OBJECT, JSON_ARRAY, JSON_OBJECTAGG,
and JSON_ARRAYAGG
) have known problems and are not supported.
Workaround:
Use VARCHAR
parameters instead.
2.12.3.2 Bug 24693010
The JavaScript Object Notation (JSON) generation functions (JSON_OBJECT, JSON_ARRAY, JSON_OBJECTAGG,
and JSON_ARRAYAGG
) can give incorrect JSON output values in a few cases including the following:
-
The database character sets are not a UTF8 character set.
-
Some of the strings are not be properly escaped.
Workaround:
If possible, limit use of JSON_OBJECTAGG
to VARCHAR2
or JSON_ARRAYAGG
to VARCHAR2
results and avoid CLOB
outputs. Use CLOB
outputs only when using single-byte character sets.
To avoid incorrect JSON output from JSON_OBJECTAGG
or JSON_ARRAYAGG
, escape VARCHAR2
columns using a custom PL/SQL function before passing the results to the operators. The escaping function must escape the double quotation character, the backslash character, and any ASCII control characters or whitespace characters other than the space.
Avoid using JSON_ARRAY
or JSON_OBJECT
with character sets other than AL32UTF8.
2.12.3.3 Bug 24490872
The input to JSON aggregate functions JSON_OBJECTAGG
and JSON_ARRAYAGG
is limited to 4,000 bytes for each input value. A longer value returns an error message.
Workaround:
None.
2.12.3.4 Bug 24469879
SQL condition JSON_EXISTS
can now be used with a path expression predicate. However, the path expression predicate cannot contain Unicode escape sequences.
Workaround:
Instead, characters from the database character set (for example, AL32UTF8) can be used. If characters from the database character set are not used, the predicate cannot be evaluated correctly.