JSON_MERGE

Purpose

JSON_MERGE is a standardized functionality for modifying a target JSON document using a JSON document called a merge . The function is described in RFC 7396.

target_expr evaluates to the JSON value target document.

_expr evaluates to the JSON value document.

JSON_MERGE evalutes the document against the target document to produce the result document. If the target or the document is NULL, then the result is also NULL.

The JSON_query_returning_clause specifies the return type of the operator. The default return type is VARCHAR2(4000).

The PRETTY keyword specifies that the result should be formatted for human readability.

The ASCII keyword specifies that non-ASCII characters should be output using JSON escape sequences.

The TRUNCATE keyword specifies that the result document should be truncated to fit in the specified return type.

The on_error_clause optionally controls the handling of errors that occur during the processing of the target and documents.

  • NULL ON ERROR - Returns null when an error occurs. This is the default.
  • ERROR ON ERROR - Returns the appropriate Oracle error when an error occurs.