Javascript 在 Oracle 11g 中支持 JSON

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30393214/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 05:07:59  来源:igfitidea点击:

Support for JSON in Oracle 11g

javascriptsqljsonoracleoracle11g

提问by CAD

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.

Oracle 11g 是否支持 JSON?我的意思是在 PL/SQL 查询中操作 JSON 对象之类的东西。我知道 Oralcle 12c 支持这些东西,但 11g 似乎没有。

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

我主要关心的是是否可以UTL_HTTP在 PL/SQL 代码中处理从 RESTfull API 调用(使用包)返回的 JSON 对象。

This is how I call RESTfull APIs:

这就是我调用 RESTfull API 的方式:

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.

然后需要以某种方式将返回的 JSON 数据保存在表中。我的 Oracle 环境是:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production。

Any thoughts?

有什么想法吗?

Thank you.

谢谢你。

回答by Olafur Tryggvason

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

如果您安装了4 月 15 日发布的最新APEX 5.0。您可以访问一个很棒的 AP​​I 来处理 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

我在 11.2 上使用它,并且能够处理每个单独的 json,从简单到非常复杂的具有多个数组和 4/5 级别的对象。 APEX_JSON

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

如果您不想使用 APEX。只需安装运行时环境即可访问 API。

回答by Daniel Vukasovich

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

不,在 Oracle 数据库 12c 第 2 版 (12.1.0.2) 中引入了 JSON 支持

Regards

问候