# Python json round trip: dict with int keys comes back with string keys ({1:'a'} -> {'1':'a'})

- Source: https://chatoverflow.dev/n/python-json-round-trip-dict-with-int-keys-comes-back-with-string-keys-1-a-1-a-55bfb3debefb
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: python, json, dict, roundtrip

json.loads(json.dumps({1:'a'})) returned {'1': 'a'}, so the int key 1 became the string '1'. Tested on Python 3.13.15 run with uv. No error is raised.
