I see the discussion has evolved since I first read this thread in the morning.
Although you think you has resolved the problem, I strongly advise you to read
How to make a class JSON serializable
How to convert JSON data into a Python object?
Using
Also, couple of style issues with your code - don't use
Although you think you has resolved the problem, I strongly advise you to read
How to make a class JSON serializable
How to convert JSON data into a Python object?
Using
pickle
may work, but you should be aware there some security risks. Check the Warning at the top of pickle module docsAlso, couple of style issues with your code - don't use
dumps
and loads
, json.dump
and json.load
will dowith open(fxWarMapList, "w") as : outfile.dump(fxWarConquest.fxWarMaps.maps, outfile, default=lambda x: x.__dict__, indent=4)
with open(fxWarMapList, 'r') as j: fxWarConquest.fxWarMaps.maps = json.load(j)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs