Search notes:

Oracle: JSON_SERIALIZE

PRETTY

PRETTY formats the result for human readability.
select
   json_serialize(
      json_array (
         json_object('id' value 1 ,'item' value 'foo' ,'pit' value sysdate + dbms_random.value*100),
         json_object('id' value 2 ,'item' value 'bar' ,'pit' value sysdate + dbms_random.value*100),
         json_object('id' value 3 ,'item' value 'baz' ,'pit' value sysdate + dbms_random.value*100)
      )
      pretty
   )
from
   dual;

-- [
--   {
--     "id" : 1,
--     "item" : "foo",
--     "pit" : "2021-10-13T20:01:18"
--   },
--   {
--     "id" : 2,
--     "item" : "bar",
--     "pit" : "2021-11-09T06:17:21"
--   },
--   {
--     "id" : 3,
--     "item" : "baz",
--     "pit" : "2021-10-30T20:47:02"
--   }
-- ]

See also

Oracle SQL/JSON

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759428489, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/functions/json/serialize/index(70): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78