close

[Fixed] json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190)

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.

How to Fix json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 190) Error?

  1. 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 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)

  2. 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 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)

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

Leave a Comment