Search notes:

Oracle JSON Object Types: Method STRINGIFY

Parameter PRETTY

23c added the parameter pretty:
declare
   jsn  json_object_t;
begin
 
   jsn := json_object_t.parse('{"num":42,"txt":"hello world!","ary":[1,1,2,3,5,8,13]}');
   dbms_output.put_line(jsn.stringify(pretty=>true));

end;
/
--
-- {
--   "num" : 42,
--   "txt" : "hello world!",
--   "ary" :
--   [
--     1,
--     1,
--     2,
--     3,
--     5,
--     8,
--     13
--   ]
-- }

See also

Oracle: JSON related PL/SQL types

Index