Create A Json Object In Oracle Apex

[Solved] Create A Json Object In Oracle Apex | Vb - Code Explorer | yomemimo.com
Question : create a json object in oracle apex

Answered by : saidul-sheik

DECLARE l_json_data CLOB;
BEGIN -- Initialize the JSON object APEX_JSON.initialize_clob_output; -- Start the JSON object APEX_JSON.open_object; -- Add key-value pairs to the JSON object APEX_JSON.write('type', 'post'); APEX_JSON.write('url', 'http://masking.zaman-it.com/smsapimany'); -- Start the "data" object within the JSON object APEX_JSON.open_object('data'); APEX_JSON.write('api_key', '{your api key}'); APEX_JSON.write('senderid', '{sender id}'); APEX_JSON.write('scheduledDateTime', '{schedule date time}'); -- Start the "messages" array within the "data" object APEX_JSON.open_array('messages'); -- Add the first message object to the array APEX_JSON.open_object; APEX_JSON.write('to', '88017xxxxxxxx'); APEX_JSON.write('message', 'test sms content ...'); APEX_JSON.close_object; -- Add the second message object to the array APEX_JSON.open_object; APEX_JSON.write('to', '88018xxxxxxxx'); APEX_JSON.write('message', 'test sms content ...'); APEX_JSON.close_object; -- End the "messages" array APEX_JSON.close_array; -- End the "data" object APEX_JSON.close_object; -- End the JSON object APEX_JSON.close_object; -- Get the generated JSON data l_json_data := APEX_JSON.get_clob_output; -- Output the JSON data DBMS_OUTPUT.put_line(l_json_data);
END;
/

Source : https://chat.openai.com/ | Last Update : Sun, 25 Jun 23

Answers related to create a json object in oracle apex

Code Explorer Popular Question For Vb