Azure / msrest-for-python

The runtime library "msrest" for AutoRest generated Python clients.
MIT License
41 stars 64 forks source link

Error in JSON response with UTF-8 BOM #144

Closed eduardomourar closed 5 years ago

eduardomourar commented 5 years ago

Whenever I receive a response from Microsoft Parter Center, the deserialization code throws the following error:

Exception: DeserializationError: JSON is invalid: Unexpected UTF-8 BOM (decode using utf-8-sig)

It happens when it runs json.loads() with a string that has BOM. I will try to create a PR to fix it.

This is related to this issue in the requests library: https://github.com/requests/requests/issues/2296