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.