How can I import/reference the json library when using Skulpt?
55 views
Skip to first unread message
J Chapman
unread,
Jan 15, 2020, 10:45:56 AM1/15/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Skulpt
I have successfully downloaded Skulpt, and have it working on a webpage.
However, it seems to break (without giving an error message) when I try to import the json library. The following code outputs "Success" when run in browser using Skulpt:
#import json
print("Success")
(i.e. with the import json line commented out). However, this code does not print anything:
import json
print("Success")
Would anyone be able to help me understand why I am having this issue?
Brad Miller
unread,
Jan 15, 2020, 12:51:39 PM1/15/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Skulpt
Skulpt leaves it up to you to catch and communicate errors, which may be different for different people depending on how they have integrated skulpt into their site.
The reason JSON is not working is that it has not been ported to skulpt. Modules are typically ported as people need them.
Brad
Austin Bart
unread,
Jan 16, 2020, 11:14:54 AM1/16/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message