diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py index fb083ed61bb..2d7b8989c71 100644 --- a/Lib/json/encoder.py +++ b/Lib/json/encoder.py @@ -350,7 +350,7 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, item_separator = _item_separator first = True if _sort_keys: - items = sorted(dct.items(), key=lambda kv: kv[0]) + items = sorted(dct.items()) else: items = dct.items() for key, value in items: