[issue26623] JSON encode: more informative error

2016-03-23 Thread Mahmoud Lababidi
New submission from Mahmoud Lababidi: The json.dumps()/encode functionality will raise an Error when an object that cannot be json-encoded is encountered. The current Error message only shows the Object itself. I would like to enhance the error message by also providing the Type. This is

[issue26623] JSON encode: more informative error

2016-03-23 Thread Mahmoud Lababidi
Changes by Mahmoud Lababidi : -- keywords: +patch Added file: http://bugs.python.org/file42258/json_encode.patch ___ Python tracker <http://bugs.python.org/issue26

[issue26623] JSON encode: more informative error

2016-03-30 Thread Mahmoud Lababidi
Mahmoud Lababidi added the comment: Is there a use case where the representation is too long? I think it may be useful to see the representation, but perhaps you are correct. -- ___ Python tracker <http://bugs.python.org/issue26

[issue26623] JSON encode: more informative error

2016-04-04 Thread Mahmoud Lababidi
Mahmoud Lababidi added the comment: Serhiy, I've attached a patch without the Object representation. Choose whichever you feel is better. -- Added file: http://bugs.python.org/file42366/json_encode.patch ___ Python tracker <http://bugs.py