Search Support

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 replies
  • 1 has this problem
  • Last reply by 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( at org.mozilla.javascript.ScriptRuntime.constructError( at org.mozilla.javascript.ScriptRuntime.notFoundError( at org.mozilla.javascript.ScriptRuntime.nameOrFunction( at at org.mozilla.javascript.gen.c4._c0(/report/method[@name="onPrepare"]:21) at[@name="onPrepare"]) at org.mozilla.javascript.ContextFactory.doTopCall( at org.mozilla.javascript.ScriptRuntime.doTopCall( at[@name="onPrepare"]) at org.mozilla.javascript.gen.c4.exec(/report/method[@name="onPrepare"]) at ... 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

All Replies (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 ( website?