27.22 INITIALIZE_CLOB_OUTPUT Procedure
This procedure initializes the output interface to write to a temporary CLOB. The default is to write to SYS.HTP. If using CLOB output, you should call FREE_OUTPUT() at the end to free the CLOB.
                  
Syntax
APEX_JSON.INITIALIZE_CLOB_OUTPUT (
    p_dur         IN PLS_INTEGER DEFAULT sys.dbms_lob.call,
    p_cache       IN BOOLEAN     DEFAULT TRUE,
    p_indent      IN PLS_INTEGER DEFAULT NULL,
    p_preserve    IN BOOLEAN     DEFAULT FALSE );Parameters
Table 27-29 INITIALIZE_CLOB_OUTPUT Procedure Parameters
| Parameter | Description | 
|---|---|
| 
                               
  | 
                           
                               Duration of the temporary   | 
                        
| 
                               
  | 
                           
                               Specifies if the lob should be read into buffer cache or not.  | 
                        
| 
                               
  | 
                           
                               Indent level. Defaults to 2 if debug is turned on, 0 otherwise.  | 
                        
| 
                              
                               
  | 
                           
                              
                               Whether to preserve the currently active output object. After calling
                    | 
                        
Example
This example configures APEX_JSON for CLOB output,
        generates JSON, prints the CLOB with
          DBMS_OUTPUT, and finally frees the CLOB.
                  
BEGIN
  apex_json.initialize_clob_output( p_preserve => true );
  apex_json.open_object;
  apex_json.write('hello', 'world');
  apex_json.close_object;
  dbms_output.put_line(apex_json.get_clob_output);
  apex_json.free_output;
END;
/Parent topic: APEX_JSON