Hi,
I'm using a Oracle 18.7 DB version.
I don't success to get directly the sub-object "department" from the next example.
I received the error:
ORA-30625: method dispatch on NULL SELF argument is disallowed
I think that something is wrong when I writed the syntax
declare
j clob :=
'{
"departments":
{
"department":{
"department_name":"DEV",
"department_no":70,
"employees":[
{
"employee_number":9000,
"employee_name":"JONES",
"salary":1000
},
{
"employee_number":9001,
"employee_name":"SMITH",
"salary":2000
}
]
}
}
}';
j2 JSON_OBJECT_T;
j3 JSON_OBJECT_T;
begin
j2 := JSON_OBJECT_T( j );
j3 := j2.get_object( 'departments.department' ); -- j2.get_object( '$.departments.department' );
dbms_output.put_line( j3.to_string );
-- dbms_output.put_line( j3.get_string( 'department_name' ) );
end;
/
Thanks on advance for every one that cal helps me.
Isaac
p.d.
My true target is to get the value of the "department_name" but I need to perform it in two steps:
1) Get the Object parent
2) Get the child value