Search notes:

ORA-40441: JSON syntax error

This snippet throws a ORA-40441: JSON syntax error exception:
declare
   json_obj json_object_t;
begin
--
-- Note the missing quotes around `y` which cause the error:
--
   json_obj := json_object_t(  '{"x": y}'   );
end;
/
The same exception is also thrown by the following snippet. Note the backslash («solidus») in "hello\world" (and compare with the ORA-40472: invalid escape in JSON data error message):
declare
   jsn json_object_t;
begin
   jsn := json_object_t.parse(q'<
     {
       "num": 42,
       "txt": "hello\world"
     }
   >');
end;
/

See also

Other Oracle error messages

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...', 1759612550, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-40441_JSON-syntax-error(59): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78