روش json.dumps() دارای پارامترهایی برایترتیب کلیدها در نتیجه:
json.dumps()
Use the sort_keys parameter to specify if the result should be sorted or not:
sort_keys