25.27 STRINGIFY Function Signature 1

This function converts a string to an escaped JSON value.

Syntax

APEX_JSON.STRINGIFY (
    p_value  IN VARCHAR2 )
RETURN VARCHAR2;

Parameters

Table 25-32 STRINGIFY Function Parameters

Parameter Description

p_value

The string to be converted.

Returns

Table 25-33 STRINGIFY Function Returns

Return Description

VARCHAR2

The converted and escaped JSON value.

Example

This example is a query that returns a JSON varchar2 value.

select apex_json.stringify('line 1'||chr(10)||'line 2') from dual;