Today We are Going To Solve json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) in Python. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.
Contents
How to Fix json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) Error?
- How to Fix json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) Error?
To Fix json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) Error just Use the
string.replace()
. You have to just use thestring.replace()
to convert these items to a string. By using it you can easily convert it to a stringimport json string = """[{"I1": "One", "I2": False}, {"I3": "Three"}]""" string = string.replace("False", '"False"') dictlist = json.loads(string)
- json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190)
To Fix json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) Error just Use the
string.replace()
. You have to just use thestring.replace()
to convert these items to a string. By using it you can easily convert it to a stringimport json string = """[{"I1": "One", "I2": False}, {"I3": "Three"}]""" string = string.replace("False", '"False"') dictlist = json.loads(string)
Solution 1 : Use the string.replace()
You have to just use the string.replace()
to convert these items to a string. By using it you can easily convert it to a string
import json
string = """[{"I1": "One", "I2": False}, {"I3": "Three"}]"""
string = string.replace("False", '"False"')
dictlist = json.loads(string)
Conclusion
So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.
Also Read These Solutions
- Uncaught (in promise) SyntaxError: Unexpected end of JSON inpu
- Error: No Firebase App ‘[DEFAULT]’ has been created – call Firebase App.initializeApp()
- Refused to load the script because it violates the following Content Security Policy directive
- ImportError: No module named requests
- TypeError: ufunc ‘isnan’ not supported for the input types, and the inputs could not be safely coerced