29.55 WRITE Procedure Signature 19

This procedure writes an array attribute of type NUMBER .

Syntax

APEX_JSON.WRITE (
   p_name        IN VARCHAR2,
   p_values      IN APEX_T_NUMBER,
   p_write_null  IN BOOLEAN  DEFAULT FALSE );

Parameters

Table 29-69 WRITE Procedure Parameters

Parameter Description
p_name The attribute name.
p_values The NUMBER 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 1, 2, 3.

DECLARE
  l_values apex_t_number := apex_t_number( 1, 2, 3 );
BEGIN
  apex_json.open_object;                -- {
  apex_json.write('array', l_values );  --   "array": [ 1, 2, 3 ]
  apex_json.close_object;               -- }
END;