I am trying to save the resulting chest into a different file format than the one used for caching.
A practical example: I used pickle when I initialize my chest because I am using nested dicts and sets, which would be stripped off I guess if it was to be stored in json.
But in the end, I would like to dump my chest into json for export.
Is there a way to do that?
For example, this does not work past the first level:
import ujson as json
with open('db.json', 'w') as f:
f.write(json.dumps(out, ensure_ascii=False, indent=4, sort_keys=True))