轉義
function replace_string_json(p_string in varchar2) return varchar2 is l_temp varchar2(30000); begin l_temp := p_string; l_temp := replace(l_temp, '\', '\\'); l_temp := replace(l_temp, '"', '\"'); l_temp := replace(l_temp, '&', '&'); l_temp := replace(l_temp, '<', '<'); l_temp := replace(l_temp, '>', '>'); l_temp := replace(l_temp, '‘', '''); l_temp := replace(l_temp, '’', '''); l_temp := replace(l_temp, '“', '"'); l_temp := replace(l_temp, '”', '"'); return l_temp; end replace_string_json;