You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for opening several issues. I really want to use jsonpickleJS in Node.js, since I'm already using jsonpickle in Python and got the encoded JSON string, and want to convert them to Js objects
The blockers are:
window is not defined in Node.js
Arbitrary Python objects can be encoded, and the prerequisite of
you'll need to have a Prototype constructor function called window.myobject.Thing in Javascript.
is hard to met
Do you have any suggestions?
The text was updated successfully, but these errors were encountered:
Here is a quick patch that I will get into the main system at some point, but if you could put it in and test it, this would be a big help. The only reference to window is in unpickler.js. The revised code should go:
from the const module_class_split onward, it should be the same.
If you have a version of node with globalThis or global it should work. Just make sure that the Prototype constructor function points to global.myobject.Thing instead.
Sorry for opening several issues. I really want to use jsonpickleJS in Node.js, since I'm already using jsonpickle in Python and got the encoded JSON string, and want to convert them to Js objects
The blockers are:
window
is not defined in Node.jsArbitrary Python objects can be encoded, and the prerequisite of
is hard to met
Do you have any suggestions?
The text was updated successfully, but these errors were encountered: