This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: json encode/decode error
Type: Stage:
Components: Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, Андрей.Гаврилин
Priority: normal Keywords:

Created on 2012-12-18 09:39 by Андрей.Гаврилин, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg177679 - (view) Author: Андрей Гаврилин (Андрей.Гаврилин) Date: 2012-12-18 09:39
I sent this.

{24: (0, ''), 27: (0, ''), 19: (0, ''), 28: (0, '')}

{"tasks": {"24": [0, ""], "27": [0, ""], "19": [0, ""], "28": [0, ""]}, "uuid": "8798b4dfbe3646e5ab05106f6f9af6fe", "delay": 3, "task_limit": 10, "arch": ["ARM", "i386", "x86_64"], "build_env": "fedora"}

And I've got this.

{"tasks": {"24": [0, ""], "27": [0, ""], "19": [0, ""], "28": [0, ""]}, "uuid": "8798b4dfbe3646e5ab05106f6f9af6fe", "delay": 3, "task_limit": 10, "arch": ["ARM", "i386", "x86_64"], "build_env": "fedora"}

{u'tasks': {u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']}, u'uuid': u'8798b4dfbe3646e5ab05106f6f9af6fe', u'delay': 3, u'task_limit': 10, u'arch': [u'ARM', u'i386', u'x86_64'], u'build_env': u'rosa'}

{u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']}

It must contain digits.


{24: (0, ''), 27: (0, ''), 19: (0, ''), 28: (0, '')}

{u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']}
msg177680 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2012-12-18 09:54
Unlike Python dictionaries, keys of Json objects are always strings. 
There is a note in the documentation: http://docs.python.org/2/library/json.html#json.dumps
msg177682 - (view) Author: Андрей Гаврилин (Андрей.Гаврилин) Date: 2012-12-18 10:24
I saw it now. I'm in a hurry today.
History
Date User Action Args
2022-04-11 14:57:39adminsetgithub: 60914
2012-12-18 10:24:42Андрей.Гаврилинsetmessages: + msg177682
2012-12-18 09:54:03amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg177680

resolution: not a bug
2012-12-18 09:39:03Андрей.Гаврилинcreate