Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

19c -parsing json -ORA-30625: method dispatch on NULL SELF argument is disallowed

883125May 1 2023

I'm trying to parse a json array which has values like “item”:['123','456'] and sometimes the item is defined as “item”:[null] and “item”:null using following

l_item_list := listElement.get_Array('item'); --json_list

dbms_output.put_line('before array check ');

if l_item_list.is_object then

     dbms\_output.put\_line('is object');

 elsif l\_item\_list.is\_array then _\--and l\_item\_list.get\_size > 0 then_

   dbms\_output.put\_line('in get size ');

  for j in 0 .. l\_item\_list.get\_size -1 loop _\--l\_item\_list.count_

    if l\_item\_list.get\_string(j) is not null then

      dbms\_output.put\_line('in if '||l\_item\_list.get\_string(j));

    v\_itemId := l\_item\_list.get\_string(j);_\--.get\_string();_

   end if;

When the json is parsing it is failing when it reaches “item”:null with method dispatch on NULL SELF argument is disallowed. I tried using isObject check also but still getting the same error.

Comments
Post Details
Added on May 1 2023
2 comments
1,694 views