... or possibly any OrderedDict.
It may be that there was never an intention to support this, however I believe it could be accommodated without significant effort.
I would also point to the excellent DotMap structure, a widely used and slightly lower-friction alternative to OrderedDicts. Testing with nested DotMap output from JSON loads encounters the exact same pass-through phenomenon.
Flattened playscript is (unchanged):
<FlatDict id=4577850192 {'version': 'playlist_0.1', 'payload': [OrderedDict([('name', 'Honk It')]), OrderedDict([('configuration', OrderedDict([('console', True), ('log_level', 'TRACE'), ('devices', [OrderedDict([('device_name', 'MacBook Pro Speakers')])]), ('output', True), ('silent', False), ('blocksize', 2048)]))]), OrderedDict([('sample', OrderedDict([('file', 'honk.wav'), ('end', 0.9), ('repeats', 2), ('buffers', 20), ('start', 0)]))]), OrderedDict([('configuration', OrderedDict([('console', True), ('log_level', 'TRACE'), ('devices', [OrderedDict([('device_name', 'MacBook Pro Speakers')])]), ('output', True), ('silent', False), ('blocksize', 4096)]))]), OrderedDict([('sample', OrderedDict([('file', 'honk.wav'), ('end', 2.4), ('repeats', 1), ('buffers', 20), ('start', 0)]))])]}>"
... or possibly any OrderedDict.
collections.OrderedDictprovides one option of protecting JSON loads that contain duplicate keys, via theobject_pairs_hook=OrderedDictmodifier. The consequent process of parsing would be much easier if the payload could be fed through flatdict, however it passes through unchanged.It may be that there was never an intention to support this, however I believe it could be accommodated without significant effort.
I would also point to the excellent DotMap structure, a widely used and slightly lower-friction alternative to OrderedDicts. Testing with nested DotMap output from JSON loads encounters the exact same pass-through phenomenon.
A sample result follows: