-
-
Notifications
You must be signed in to change notification settings - Fork 296
Closed
Labels
Description
Describe the bug
The JsonSummary-Report contains a Byte Order Mark (BOM).
This is invalid JSON according to https://datatracker.ietf.org/doc/html/rfc8259#section-8.1
Implementations MUST NOT add a byte order mark (U+FEFF) to the
beginning...
Why am I reporting this?
I'm trying to parse the JsonSummary using the Jenkins Step readJSON, which fails because of the BOM 😢
change
using (var reportTextWriter = new StreamWriter(new FileStream(targetPath, FileMode.Create), Encoding.UTF8))
to
using (var reportTextWriter = new StreamWriter(new FileStream(targetPath, FileMode.Create), new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)))