JSON object in Scoped Application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2017 04:55 AM
Hello,
Working on a Helsinki instance,
var json = new JSON();
Works fine in the Global Scope but crashes within an Scoped Application:
Invalid object in scoped script: org.mozilla.javascript.gen.sys_script_include_04cf1a2f0fd2020094f3c09ce1050eba_905@1cadf34
{"error":{"detail":"TypeError: org.mozilla.javascript.NativeJSON@7737e3 is not a function. (sys_script_include.1d264e71dbd83200b7bbd001cf961986; line 7)","message":"org.mozilla.javascript.NativeJSON@7737e3 is not a function."},"status":"failure"}
Any idea how to solve this issue?
Many thanks.
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2017 06:02 AM
Try:
var json = new global.JSON();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 07:53 AM
This worked, too bad it wasn't marked as the answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2020 07:25 AM
Worked for me too. Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2017 08:25 AM
From Helsinki, i guess JSON.stringify() and JSON.parse() are supported in both Server and Client side.
Not sure about Scoped apps though.