mohammad_1m2 mohammad_1m2 - 2 months ago 30
JSON Question

Identifier 'APEX_JSON.PARSE' must be declared in oracle 11.2.0

I want to parse JSON in Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production. But below error reported:

ORA-06550: line 4, column 5:
PLS-00201: identifier 'APEX_JSON.PARSE' must be declared


Here is my sample code:

DECLARE
s varchar2(32767) := '{ "a": 1, "b": ["hello", "world"]}';
BEGIN
apex_json.parse(s);
sys.dbms_output.put_line('a is '||apex_json.get_varchar2(p_path => 'a'));
END;


Does this version support this feature?

Answer Source

This depends on the APEX version within your database, which I'm guessing may still be 4.x on your 11.2 instance.

SELECT VERSION_NO FROM APEX_RELEASE;

The apex_json package was introduced with 5.0 http://docs.oracle.com/cd/E59726_01/doc.50/e39149/apex_json.htm#AEAPI29635