PLS-00869
ASCII or PRETTY not supported for non-textual return data type
Cause
An attempt was made to PRETTY print or escape non-ASCII characters for a non-textual output of a JSON operation.
Action
Change the return data type to VARCHAR2 or CLOB, or remove the PRETTY or ASCII serialization output.