Not by returning a SYS_REFCURSOR and letting ORDS generates the JSON, it will always be a list of simple objects, if you want a hierarchical structure you need to generate the JSON yourself (JSON_OBJECT, JSON_ARRAY, JSON_ARRAYAGG, ...), and remember to name the column "{}someName" to avoid ORDS to escape it.