karapace
karapace copied to clipboard
fix: harden the order of keys that needs to be serialized
Why this way
Previously we were relying on the fact that the .keys()
order and the json.dumps()
order are always sync. This enforces by the OrderedDict
a fixed order. Not sure if the same odering check should be performed also for the is_key_in_canonical_format
, probably here we want to ensure that the current dict has exactly the same order in the keys()
.
Need to do the same for the canonical format