Closed juspence closed 2 years ago
Hi! Thanks for the contribution.
Please write tests to cover the new functionality.
Also I believe that dictionaries maintain order only starting with Python 3.7, so I think it should check for Python version and if it is <3.7 throw NotImplementedError
or maybe return OrderedDict
?
@mprpic, are you planning to review this change?
In some cases you can use json.dumps(my_dict, sort_keys=True), but this PR will support cases where the Python dict should be sorted while remaining a Python dict (so is not dumped to JSON format).