On Fri, Sep 23, 2016 at 9:37 PM, Mark Richman wrote:
>
> Is there any way to tell Decode() to ignore the BOM, or do I have to peek at
> the first 3 bytes and skip them somehow?
>
What you need is an io.Reader that skips the BOM.
Luckily someone wrote a package for that.
https://github.com/spkg/bo
I have a JSON file which begins with the UTF-8 byte-order marker (BOM) 0xEF
0xBB 0xBF.
This causes Decode() to fail with SyntaxError:
SyntaxError invalid character 'ï' looking for beginning of value - Offset: 1
Is there any way to tell Decode() to ignore the BOM, or do I have to peek
at the f