Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Support for JSON in Oracle 11g

Does Oracle 11g support JSON? I mean stuff like manipulating JSON objects in PL/SQL Queries. I know Oralcle 12c has the support for these things but it seems 11g does not.

My main concern is whether it is possible to handle JSON objects returned from RESTfull API calls (using UTL_HTTP package) in PL/SQL code.

This is how I call RESTfull APIs:

req := UTL_HTTP.BEGIN_REQUEST('https://xxxx/api/job/all', 'GET', 'HTTP/1.1');

  UTL_HTTP.set_header(req, 'Content-Type', 'application/json');
  UTL_HTTP.set_header(req, 'apikey','xxxxx');
  resp := UTL_HTTP.GET_RESPONSE(req);

Then need to somehow save retruned JSON data in tables. My Oracle envirment is: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.

Any thoughts?

Thank you.

like image 212
CAD Avatar asked May 22 '15 09:05

CAD


2 Answers

No, JSON support was introduced in Oracle database 12c release 2 (12.1.0.2)

Regards

like image 183
Daniel Vukasovich Avatar answered Sep 23 '22 08:09

Daniel Vukasovich


If you install the latest APEX 5.0 which was released on April 15. You get access to a great API to work with JSON

I'm using it on 11.2 and have been able to crunch every single json, from simple to very complex objects with multiple arrays and 4/5 levels. APEX_JSON

If you do not want to use APEX. Simply install the runtime environment to get access to the API.

like image 33
Olafur Tryggvason Avatar answered Sep 21 '22 08:09

Olafur Tryggvason