Send JSON Data prepared in a module function to PL/SQL procedure
Content
Hi,
There is a requirement to pass json type data to pl/sql procedure.
Currently, we are passing json after stringify and then replacing " with \". Since just doing stringify was not working for us hence we have to go for replace.
Below is the code for your reference
var obj={"po_line_details_array":payload,"po_line_array":PoLineArray};
var newObj= JSON.stringify(obj).replace(/"/g, '\\"');
console.log(newObj);
return newObj;
Here, payload and PoLineArray are arrays.
newObj is returned by my module function and send to custom rest service which calls the procedure that accepts this object as parameter. The data type of input parameter in pl/sql procedure is CLOB .
Tagged:
0