25.24 OPEN_OBJECT Procedure

This procedure writes an open curly bracket symbol as follows:

{

Syntax

APEX_JSON.OPEN_OBJECT (
    p_name     IN VARCHAR2 DEFAULT NULL );

Parameters

Table 25-29 OPEN_OBJECT Procedure Parameters

Parameter Description

p_name

If not null, write an object attribute name and colon before the opening brace.

Example

This example performs a write { "obj": { "obj-attr": "value" }}.

BEGIN
  apex_json.open_object; -- {
  apex_json.open_object('obj'); -- "obj": {
  apex_json.write('obj-attr', 'value'); -- "obj-attr": "value"
  apex_json.close_all; -- }}
END;