Because in Python 2, `json` is perfectly happy with either a `str` object or a `unicode` object. In Python 3, `json` is more strict, and only will accept `str` (the equivalent of Python 2's `unicode`) and will not accept `bytes` (the equivalent of Python 2's `str`). This is just enforcing more correct types.