How can I import/reference the json library when using Skulpt?

Skip to first unread message

J Chapman

Jan 15, 2020, 10:45:56 AM1/15/20
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
(i.e. with the import json line commented out). However, this code does not print anything:

import json
Would anyone be able to help me understand why I am having this issue?

Brad Miller

Jan 15, 2020, 12:51:39 PM1/15/20
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.


Austin Bart

Jan 16, 2020, 11:14:54 AM1/16/20
to Skulpt
I forget where we got it from, but the Blockpy fork for Skulpt has an implementation of the JSON package:
Reply all
Reply to author
0 new messages