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