sábado, 9 de noviembre de 2024

JSON Data Structures

 To work with JSON data in PL/SQL, you can use these data structures.


JSON_ELEMENT_T Object Type

https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/json-types.html#GUID-639D871E-D116-4793-888E-F7948E48F4DE

JSON_OBJECT_T Object Type

https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/json-types.html#GUID-10062646-E36F-48B1-9F24-751B613DFB5A

JSON_ARRAY_T Object Type                             

https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/json-types.html#GUID-69E61601-5533-418B-8C03-E591B4F7FE36

JSON_SCALAR_T Object Type

https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/json-types.html#GUID-B9526171-92E2-423A-8831-872ADCC71D1E

JSON_KEY_LIST Type

https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/json-types.html#GUID-50692D34-FEAF-471E-BA22-17530E31D95D


Related Topics

Oracle Database JSON Developer’s Guide

https://docs.oracle.com/pls/topic/lookup?ctx=en/database/oracle/oracle-database/18/arpls&id=ADJSN-GUID-C0C2A8C0-99BD-4770-9EA2-B7D53804FC18

The JSON standard

http://www.json.org/


288.1 JSON_ELEMENT_T Object Type

JSON_ELEMENT_T is the supertype for the JSON_OBJECT_T, JSON_SCALAR_T, and JSON_ARRAY_T object types.


Description

Note the following:

To create an instance of JSON_ELEMENT_T, use the parse function. See the “Constructors” section below for details.

You cannot create an empty JSON_ELEMENT_T instance. To create an empty JSON container, create it based on one of the subtypes.

To cast a JSON_ELEMENT_T into a subtype (for example, JSON_OBJECT_T), you need to perform an explicit cast using TREAT AS. For example:


Copy

TREAT (elem AS JSON_OBJECT_T)

Constructors


You create a JSON_ELEMENT_T instance using the parse function. The function takes as input VARCHAR2, CLOB, or BLOB data, and returns a JSON_ELEMENT_T instance.



Copy

STATIC FUNCTION parse(json VARCHAR2) RETURN JSON_ELEMENT_T

STATIC FUNCTION parse(json CLOB)     RETURN JSON_ELEMENT_T

STATIC FUNCTION parse(json BLOB)     RETURN JSON_ELEMENT_


----

seguir viendo en la pagina original



 Fuentes.

Artículo:  "JSON Data Structures" Publicado en https://docs.oracle.com/ por oracle . Consultado el 6 Nov. 2024  .

URL: https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/json-types.html#GUID-639D871E-D116-4793-888E-F7948E48F4DE


No hay comentarios:

Publicar un comentario