SyntaxFix
Write A Post
Hire A Developer
Questions
The normally used load command will work if you specify the object_pairs_hook parameter:
import json from collections import OrderedDict with open('foo.json', 'r') as fp: metrics_types = json.load(fp, object_pairs_hook=OrderedDict)