declare
return_json varchar(1000);
begin
-- 初始化json输出
apex_json.initialize_clob_output;
-- 打开json对象
apex_json.open_object;
-- 写入json对象
apex_json.write(
p_name => 'dgrm_id'
, p_value => :appid
);
apex_json.write(
p_name => 'order_code'
, p_value => :order_code
);
-- 关闭json对象
apex_json.close_object;
-- 把json对象赋值给字符串
return_json := APEX_JSON.get_clob_output;
-- DBMS_OUTPUT.put_line()
sys.htp.print(return_json);
end;