This procedure initializes the output interface. You only have to call this procedure if you want to modify the parameters below. Initially, output is already configured with the defaults mentioned in the parameter table.
Syntax
APEX_JSON.INITIALIZE_OUTPUT (
    p_http_header     in boolean     default true,
    p_http_cache      in boolean     default false,
    p_http_cache_etag in varchar2    default null, 
    p_indent          in pls_integer default null );
Parameters
Table 15-22 INITIALIZE_OUTPUT Procedure Parameters
| Parameter | Description | 
|---|---|
| 
 | If TRUE (the default), write an application/JSON mime type header. | 
| 
 | This parameter is only relevant if  | 
| 
 | If not null, writes an  | 
| 
 | Indent level. Defaults to 2, if debug is turned on, otherwise defaults to 0. | 
Example
This example configures APEX_JSON to not emit default headers, because they are written directly.
BEGIN
  apex_json.initialize_output (
      p_http_header => false );
 
  sys.owa_util.mime_header('application/json', false);
  sys.owa_util.status_line(429, 'Too Many Requests');
  sys.owa_util.http_header_close;
  --
  apex_json.open_object;
  apex_json.write('maxRequestsPerSecond', 10);
  apex_json.close_object;
END;