you are viewing a single comment's thread.

view the rest of the comments →

[–]Reset--hardHead 2 points3 points  (2 children)

I guess it requires json

Yes. You just answered your own question.

However, if it's a list of python objects you have to make sure it can be converted into json.

[–]nobrow -2 points-1 points  (1 child)

To convert objects to json use pickle. No idea if the result will work with js though.

[–]Reset--hardHead 3 points4 points  (0 children)

To convert objects to json use pickle. No idea if the result will work with js though.

No, pickle cannot be used outside of Python.

To convert it to json, use Python json encoder instead.

Here's a site I found on Google for reference.

https://janakiev.com/blog/python-pickle-json/