Closed dowlingw closed 7 months ago
Great point! I definitely think this should be built-in functionality. I'd gladly accept a PR to add this.
Thanks, I've got the code to do this ready to go - will throw some tests around it and put together a PR as soon as possible, thanks!
Added this feature to v11
According to RFC 7159, documents with a byte order mark are not valid JSON: https://tools.ietf.org/html/rfc7159#section-8.1
However, there are a number of notable specifications published that violate the standard. Example: https://github.com/Azure/azure-resource-manager-schemas
It is currently possible to work around this by wrapping the inbuilt JSON parser with a custom parser that strips the offending characters.
Suggesting that this might be common enough that it's worth adding a flag to the JSON parser to handle this until the upstream sources are able to revise their specifications.