JSON Scalar Allowed at Top Level of JSON Document (RFC 8259 Support)

JSON documents in Oracle Database can now have a top-level JSON scalar value. Previously they had to have a JSON object or array value.

This feature helps Oracle JSON support be compliant with RFC 8259.

This feature will only be available when the database initialization parameter compatible is set to 20 or higher.

If the parameter value is at least 20, then JSON data that is stored either textually (VARCHAR2, CLOB, BLOB) or as JSON data type respects RFC 8259: it allows top-level scalars in documents. For a JSON column you can, however, use an IS JSON check constraint with keywords DISALLOW SCALARS to disallow documents having top-level scalar value.

Related Topics