The second row is returned because, while the key name a appears twice, it is in two different objects. The following statement queries table t and returns col1 values that are well-formed JSON data with unique key names within each object: The following statements insert values into column col1 of table t: Testing for STRICT or LAX JSON Syntax: Example The following statement creates table t with column col1: A WITHOUT UNIQUE KEYS test performs faster than a WITH UNIQUE KEYS test. If you specify WITHOUT UNIQUE KEYS, then this condition considers JSON data to be well-formed even if duplicate key names occur within an object. If you specify WITH UNIQUE KEYS, then this condition considers JSON data to be well-formed only if key names are unique within each object. Refer to Oracle XML DB Developer's Guide for more information on strict and lax JSON syntax.
If you specify LAX, then this condition also considers lax JSON syntax to be well-formed JSON data. If you specify STRICT, then this condition considers only strict JSON syntax to be well-formed JSON data. You must specify FORMAT JSON if expr is a column of data type BLOB. If expr evaluates to null or a text literal of length zero, then this condition returns UNKNOWN. If expr is a column, then the column must be of data type VARCHAR2, CLOB, or BLOB. Specify an expression that evaluates to a text literal. Use expr to specify the JSON data to be evaluated. If you specify IS NOT JSON, then this condition returns TRUE if the expression is not well-formed JSON data and FALSE if the expression is well-formed JSON data.ĭescription of the illustration ''is_json_condition.gif'' If you specify IS JSON, then this condition returns TRUE if the expression is well-formed JSON data and FALSE if the expression is not well-formed JSON data.
Use this condition to test whether an expression is syntactically correct, or well-formed, JSON data.