Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

nssmanjaFeb 27 2018 — edited Feb 27 2018

Hi all,

I have tried to create and download some xml file using pl/sql like this:

  begin

      OWA_UTIL.mime_header ('application/xml', FALSE);

      htp.p('Content-Disposition:attachment;filename="test.xml"');

      OWA_UTIL.http_header_close;

      htp.p ( '<?xml version="1.0" encoding="UTF-8"?>' );

      htp.p ( '<DocumentProperties>');

      htp.p ( '     <Author>author</Author>' );

      htp.p ( '     <LastAuthor>lastauthor</LastAuthor>' );

      htp.p ( '     <Created>created</Created>' );

      htp.p ( '</DocumentProperties>');

   apex_application.g_unrecoverable_error:= true;

  end;

But when I call this procedure from Apex application I got this error: Error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

I'm using Apex 5.1.4 on 11g DB and mod_plsql.

This code works for me on Apex 4.2 and Apex 5.0.

Thanks in advance

Saša

I have just tested on apex.oracle.com and it works as expected. Any idea what can be wrong with my environment? Message was edited by: nssmanja

This post has been answered by Pavel_p on Feb 27 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2018
Added on Feb 27 2018
7 comments
3,067 views