55.20 PLIST_TO_JSON_CLOBファンクション

このファンクションは、apex_t_varchar2レコードをsys.json_object_tオブジェクト・タイプに変換し、文字列化します。

奇数の要素は属性名です。

偶数の要素は属性値です。

構文

APEX_STRING.PLIST_TO_JSON_CLOB (
    p_plist IN apex_t_varchar2 )
RETURN CLOB;

パラメータ

パラメータ 説明
p_plist 表。

戻り値

指定されたp_plistのキーおよび値を持つJSONオブジェクトを含むCLOB。

次の例では、JSONオブジェクト{"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;