37.54 WRITE Procedure Signature 18
This procedure writes an array attribute of type VARCHAR2
.
Syntax
APEX_JSON.WRITE (
p_name IN VARCHAR2,
p_values IN APEX_T_VARCHAR2,
p_write_null IN BOOLEAN DEFAULT FALSE );
Parameters
Table 37-67 WRITE Procedure Parameters
Parameter | Description |
---|---|
p_name |
The attribute name. |
p_values |
The VARCHAR2 array values to be written.
|
p_write_null |
If true, write an empty array. If false (the default), do not -- write an empty array. |
Example
This example writes an array containing a, b, c.
DECLARE
l_values apex_t_varchar2 := apex_t_varchar2( 'a', 'b', 'c' );
BEGIN
apex_json.open_object; -- {
apex_json.write('array', l_values ); -- "array": [ "a", "b", "c" ]
apex_json.close_object; -- }
END;
Parent topic: APEX_JSON