21.23 OPEN_ARRAY Procedure
This procedure writes an open bracket symbol as follows:
[
Syntax
APEX_JSON.OPEN_ARRAY (
p_name IN VARCHAR2 DEFAULT NULL );
Parameters
Table 21-27 OPEN_ARRAY Procedure Parameters
Parameter | Description |
---|---|
|
If not null, write an object attribute name and colon before the opening bracket. |
Example
This example performs a write { "array":[ 1 ,[ ] ] }
.
BEGIN
apex_json.open_object; -- {
apex_json.open_array('array'); -- "array": [
apex_json.write(1); -- 1
apex_json.open_array; -- , [
apex_json.close_array; -- ]
apex_json.close_array; -- ]
apex_json.close_object; -- }
END;
Parent topic: APEX_JSON