Python : How to fix Unexpected UTF-8 BOM error when using json.loads
With Python, it is a really easy to retrieve data from 3rd party API services, so I made a script for this purpose. The script worked without any issue for many different API URLs, but recently, when I wanted to load the server content response from a specific API URL into json.loads
method, it threw an "Unexpected UTF-8 BOM" error. In this article, we will examine what the error means and various ways to solve it.