Vyhľadajte odpoveď

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

JSON(inbuilt as per ECMA-404) not recognized by Mozilla Firefox browser

  • 2 odpovede
  • 1 má tento problém
  • 37 zobrazení
  • Posledná odpoveď od cor-el

more options

I am getting following error when executing my script on Mozilla Firefox browser:

Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "JSON" is not defined. (/report/method[@name="onPrepare"]#21) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632) at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717) at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1758) at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1697) at org.mozilla.javascript.gen.c4._c0(/report/method[@name="onPrepare"]:21) at org.mozilla.javascript.gen.c4.call(/report/method[@name="onPrepare"]) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065) at org.mozilla.javascript.gen.c4.call(/report/method[@name="onPrepare"]) at org.mozilla.javascript.gen.c4.exec(/report/method[@name="onPrepare"]) at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:290) ... 24 more

The part of script where issue seems to be originating from is mentioned below:

var content = {}; content.auditTypes = auditType; content.users = user; content.auditBeginDate = auditBeginDate; content.auditEndDate = auditEndDate;

var jsonContent = JSON.stringify(content); // ---- This is line 21

Všetky odpovede (2)

more options

Any information to identify cause for this problem or a workaround would be helpful. Do let me know in case additional information is required and I shall provide the same.

more options

Try to ask advice at the Stack Overflow forum site.

Could be a sandbox issue where JSON is not available due to sandbox restrictions.

What kind of code is this and how is it executed.

Can you reproduce on the JSfiddle (jsfiddle.net) website?