To work with JSON data in PL/SQL, you can use these data structures.
JSON_ELEMENT_T Object Type
JSON_OBJECT_T Object Type
JSON_ARRAY_T Object Type
JSON_SCALAR_T Object Type
JSON_KEY_LIST Type
Related Topics
Oracle Database JSON Developer’s Guide
The JSON standard
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 .
No hay comentarios:
Publicar un comentario