25.20 GET_CLOB Function
This function returns clob member value. This function auto-converts varchar2
, boolean and number values.
Syntax
GET_CLOB (
p_path IN VARCHAR2,
p0 IN VARCHAR2 DEFAULT NULL,
p1 IN VARCHAR2 DEFAULT NULL,
p2 IN VARCHAR2 DEFAULT NULL,
p3 IN VARCHAR2 DEFAULT NULL,
p4 IN VARCHAR2 DEFAULT NULL,
p_default IN CLOB DEFAULT NULL,
p_values in t_values default g_values )
RETURN CLOB
Parameters
Table 25-24 GET_CLOB Function Parameters
Parameter | Description |
---|---|
|
Parsed json members. defaults to |
|
Index into |
|
Each |
|
Default value if the member does not exist. |
Returns/Raised Errors
Table 25-25 GET_CLOB Function Returns and Raised Errors
Return/Raised Errors | Description |
---|---|
|
Value at the given path position |
|
If |
Example
Parse a JSON string and print the value at a position.
declare
j apex_json.t_values;
begin
apex_json.parse(j, '{ "items": [ 1, 2, { "foo": 42 } ] }');
dbms_output.put_line(apex_json.get_clob (
p_values => j,
p_path => 'items[%d].foo',
p0 => 3));
end;
Parent topic: APEX_JSON