Hi,
I followed through the tutorial on Mapping of JSON Data To and From SQL Object Types. This is really great and helpful. But in my case I am trying to use this inside a package and i want to create a RECORD Type from the JSON. Something like below
eg:
TYPE Entity_Person IS RECORD (
id VARCHAR2(100),
name VARCHAR2(4000),
age NUMBER);
FUNCTION Get_Person_From_JSON(
json_ IN VARCHAR2 ) RETURN Entity_Person
IS
BEGIN
RETURN JSON_VALUE(json_, '$' RETURNING Entity_Person);
END Get_Person_From_JSON;
Obviously this didn't work. I followed the tutorial and it works on OBJECTS. But does 19c Supports conversion of JSON DATA to and from RECORD Types as well? If yes can you point me what have I done wrong?
Thanks.