My Oracle Support Banner

How to Convert Between PL/SQL Collection Types and JSON Using JSON Constructor/JSON_VALUE (Doc ID 2993149.1)

Last updated on JULY 20, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 23.4 and later
Oracle Database - Standard Edition - Version 23.4 and later
Information in this document applies to any platform.

Goal

This document guides how to convert between PL/SQL collection types and JSON types using JSON constructor/JSON_VALUE.
In 23ai or later, PL/SQL JSON constructor is enhanced to accept an instance of a corresponding PL/SQL aggregate type, returning a JSON object or array type populated with aggregate type data.
PL/SQL JSON_VALUE operator is enhanced so that its returning clause can accept a type name that defines type of tinstance that operator is to return.
JSON constructor support for aggregate data types streamlines data interchange between PL/SQL applications and languages that support JSON.


Reference information:
Oracle® Database Oracle Database New Features Release 23ai
JSON/JSON_VALUE will Convert PL/SQL Aggregate Type to/from JSON
https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/application_development.html#GUID-83344-2

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Associative Array (Index By Table)
 Nested Table
 Varrays
 Record Types
 Object Types
 Collections of Record Types and Object Types
 Associative Array of Record Types
 Associative Array of Object Types
 Nested Table of Record Types
 Nested Table of Object Types
 Varray of Record Types
 Varray of Object Types

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.