New submission from CT Radu: Currently, json.loads expects a string as input and is expected to return a dictionary or raise an exception.
Proposal: If the first argument of json.loads is a dictionary return that dictionary, instead of raising a TypeError as it happens now. There are some use cases where json.loads would be applied multiple times to the same object. Once the string has been parsed once, it shouldn't be reloaded. ---------- components: Library (Lib) messages: 244864 nosy: CT Radu priority: normal severity: normal status: open title: json.loads should be idempotent when the argument is a dictionary type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24387> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com