[New-bugs-announce] [issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON
Adrián Chaves Fernández
report at bugs.python.org
Sat Sep 7 14:33:15 CEST 2013
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 <report at bugs.python.org>
<http://bugs.python.org/issue18958>
_______________________________________
More information about the New-bugs-announce
mailing list