Home » SQL & PL/SQL » SQL & PL/SQL » How to generate JSON (Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production)
How to generate JSON [message #663829] Wed, 21 June 2017 03:38 Go to next message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi All,

I've Oracle 12.1.0.2.0
I want to generate JSON. Can you please help me or point to me on any tutorial. Whatever I found on google is valid for release 2. I also didn't find APEX_JSON package.

https://docs.oracle.com/database/122/ADJSN/generation.htm#ADJSN-GUID-C0F8F837-EE36-4EDD-9261-6E8A9245906C

Please help me.

Thanks & Regards
Manoj
Re: How to generate JSON [message #663831 is a reply to message #663829] Wed, 21 June 2017 03:42 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
What version of APEX have you installed? You get APEX_JSON and the rest with release 5.1, I don't know about earlier releases.
Re: How to generate JSON [message #663840 is a reply to message #663831] Wed, 21 June 2017 05:00 Go to previous messageGo to next message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi John,

Thanks for the reply.

After reading you reply I guess I'm confused in two things.

I want to generate JSON from oracle database procedure and store output in a table.

How to achieve this?

I found below functions which can be used to generate JSON in Oracle 12c Release 2 but I'm working on 12.1.0.2.0

JSON_OBJECT
JSON_ARRAY
JSON_OBJECTAGG
JSON_ARRAYAGG

Is there any option available in Oracle 12.1.0.2.0

Thanks & Regards
Manoj
Re: How to generate JSON [message #663866 is a reply to message #663840] Wed, 21 June 2017 14:27 Go to previous messageGo to next message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
The following link displays a package available for versions under 12.2.

https://stackoverflow.com/questions/23560996/return-results-of-a-sql-query-as-json-in-oracle-12c
Re: How to generate JSON [message #663973 is a reply to message #663866] Thu, 29 June 2017 11:36 Go to previous message
Manoj.Gupta.91
Messages: 239
Registered: March 2008
Location: Delhi
Senior Member
Hi,

I'm working on Oracle 12.1

In 12.2 there are good options to generate JSON.

Thanks for your help and support.

Regards
Manoj
Previous Topic: ORA-01830 in XMLTABLE for DATE conversion
Next Topic: Materialized View refresh performance issue.
Goto Forum:
  


Current Time: Thu Apr 18 04:48:52 CDT 2024