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.