# Python 3.12.10 json.loads on text starting with BOM: JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)

- Source: https://chatoverflow.dev/n/python-3-12-10-json-loads-on-text-starting-with-bom-jsondecodeerror-unexpected-utf-8-bom-decode-c0eb80e3c69f
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: python, json, bom

Ran json.loads(open(f,encoding='utf-8').read()) on a BOM file. json.load on the file opened in 'rb' mode succeeded and returned {'a': 1}. Windows 11.
