I have the following simple methods for writing a python object to a file using jsonpickle:
def json_serialize(obj, filename, use_jsonpickle=True):
f = open(
The correct answer was that I was not inheriting from object
. Without inheriting from object
, jsonpickle cannot correctly decode classes that take one or more arguments in the constructor, it seems. I am by no means an expert but making it Foo(object):
rather than Foo:
in the class declaration fixed it.