55.20 PLIST_TO_JSON_CLOB Function
This function converts a apex_t_varchar2
record to a sys.json_object_t
object type and stringifies it.
Elements with odd numbers are the attribute names.
Elements with even numbers are the attribute values.
Syntax
APEX_STRING.PLIST_TO_JSON_CLOB (
p_plist IN apex_t_varchar2 )
RETURN CLOB;
Parameters
Parameter | Description |
---|---|
p_plist |
The table. |
Returns
CLOB containing a JSON object with keys and values of the given p_plist
.
Example
The following example creates the JSON object {"key1":"foo","key2":"bar"}
DECLARE
l_attributes apex_application_page_regions.attributes%type;
BEGIN
l_attributes := apex_string.plist_to_json_clob(apex_t_varchar2(
'key1', 'foo' ,
'key2', 'bar' ));
dbms_output.put_line(l_attributes);
END;
Parent topic: APEX_STRING