Hi all,
I think that I've found an interesting inconsistency with how APEX_JSON escapes characters.
When you use the apex_json.write signature that has a string as parameter it escapes the string.
However, when you use the apex_json.write signature that takes an xmltype as a parameter, it doesn't.
Example attached.
It seems to me that it should be one or the other. I suppose that in an ideal world, we'd be able to specify whether we want to turn escaping on or off.
Oracle Support document "Can Apex_json Not Escape Special Characters like "&" or "/" (Doc ID 2120249.1)" is pretty emphatic about escaping characters being the norm. So it's a little surprising to find this inconsistent behaviour.
What do you think?
All the best.
Niall.
apex_json_inconsistent.sql.txt (636 Bytes)