Can I get JSON to load into an OrderedDict?

Ok so I can use an OrderedDict in json.dump. That is, an OrderedDict can be used as an input to JSON.

But can it be used as an output? If so how? In my case I’d like to load into an OrderedDict so I can keep the order of the keys in the file.

If not, is there some kind of workaround?

6 Answers
6

Leave a Comment