errors with json.loads
john polo
jpolo at mail.usf.edu
Thu Sep 21 12:17:44 EDT 2017
More information about the Python-list mailing list
Thu Sep 21 12:17:44 EDT 2017
- Previous message (by thread): errors with json.loads
- Next message (by thread): errors with json.loads
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/20/2017 5:56 PM, John Gordon wrote: > In <mailman.101.1505945630.2730.python-list at python.org> john polo <jpolo at mail.usf.edu> writes: > >> JSONDecodeError: Expecting ':' delimiter: line 5 column 50 (char 161) >> ?json.loads says that the method is for deserializing "s", with "s" >> being a string, bytes, or bytearray. >> In [24]: type(text) >> Out[24]: str >> So "text" seems to be a string. Why does json.loads return an error? > Because, although text is the right type, it does not contain a > valid json string. Thank you for the reply, John. I am not familiar with how to check validity for json. I typed the example into notepad++ and saved as .json and didn't take any further steps after that. I'll look into that. John
- Previous message (by thread): errors with json.loads
- Next message (by thread): errors with json.loads
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list