hi, I created an ajaxcallback process in which I execute a pls/sql code and I wanted to know 2 things:
is it possible to send json data ?
is it possible to process json data in pl/sql code?
this is my client code:
saveData = function(){
let model = {};
let data = {};
let formData = $('#wwvFlowForm').serializeArray();
let count = 1;
model.x01 = JSON.stringify(formData);
console.log(model.x01);
console.log(data);
apex.server.process(
'SAVE_DATA_PAZIENTE',
model,
{
dataType: 'json',
success: function(data){
console.log(data);
apex.message.showPageSuccess(data);
},
error: function(error){
apex.message.alert(error.responseText);
}
}
);
};
this is my server code:
declare
l_clob clob;
begin
l_clob := APEX_APPLICATION.G_X01;
apex_json.parse(
p_source => l_clob );
dbms_output.put_line('json: ' || l_clob);
raise_application_error(-20000, APEX_APPLICATION.G_X01);
end;
Best regards