26.12 GET_CLOB_OUTPUT Function
Returns the temporary CLOB that you created with INITIALIZE_CLOB_OUTPUT.
Syntax
FUNCTION GET_CLOB_OUTPUT(
p_free IN BOOLEAN DEFAULT FALSE )
RETURN CLOB;Parameters
Table 26-9 GET_CLOB_OUTPUT Function Parameters
| Parameter | Description |
|---|---|
|
|
Free output resources, if "true". Defaults to false. |
Example 1
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;
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;Example 2
This example configures APEX_JSON for CLOB output, generates
JSON, and prints and frees the CLOB with DBMS_OUTPUT and
GET_CLOB_OUTPUT.
BEGIN
apex_json.initialize_clob_output;
apex_json.open_object;
apex_json.write('hello', 'world');
apex_json.close_object;
dbms_output.put_line(apex_json.get_clob_output( p_free => true ) );
END;
Parent topic: APEX_JSON