I have an inventory program that I create instances of objects in, and I'd naturally like to save it and then re-load it. I've completed it with pickle
but I want to do it with the json
module for added security.
I simply need to know how to write an Encoder/Decoder to serialize, and simplified steps would be great. I've gotten responses/help/advise to write like this:
(the link is to another stackoverflow question that's basically exactly what I'm trying to understand...it's short and contains code example)
How to save a dictionary of objects?
but I still don't quite get it. If you could comment the code in any examples you write I'd really appreciate it. I would also like to stay away from decorators
if possible since I'm having a heck of a time understanding them as well.