json.dumps returns unicode on py3 and bytes on py2