json_table mishandles null-array
I'm trying to understand why json arrays are handled differently when they are passed empty (brackets without content) than when they are passed as null, and wondered if anyone here has an explanation for it.
All json messages discussed below were parsed with the "json_table" function in an oracle 12.2.0.1.0 database.
The executed statement is the same for each json message:
select main_ordinality
, sub_ordinality
, main_id
, sub_id
from json_table( :b1, '$' error on error
columns ( nested path '$[*]' columns ( main_ordinality for ordinality
, main_id varchar2(1) path '$.main_id' null on empty
, nested path '$.subs[*]' columns ( sub_ordinality for ordinality