New submission from Adrián Chaves Fernández: Calling json.load() with a file object or json.loads() with a string containing the attached JSON code raises an exception with the message 'No JSON object could be decoded'.
I’ve pasted the JSON code into http://jsonlint.com/ and it reports it as valid JSON. This JSON code comes from the 0 A.D. game (https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/civs/maur.json), and the game successfully parses it as well (with whatever they use for that). Yet it fails with json.load() and json.loads(). Note also that the rest of the JSON files of the same game folder (https://github.com/0ad/0ad/tree/master/binaries/data/mods/public/civs) do work with json.load() and json.loads(). ---------- components: Extension Modules files: input.json messages: 197152 nosy: Gallaecio priority: normal severity: normal status: open title: Exception('No JSON object could be decoded') when parsing a valid JSON type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file31643/input.json _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18958> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com