When parsing a JSON file with BOM such as:
https://github.com/dotnet/toolset/blob/40cc5860e2ef311b9aca733b1d2eccaa681bd422/TestAssets/InstallationScriptTests/InstallationScriptTests.json
JSON.awk gives the following error:
/datadrive/projects/toolset/TestAssets/InstallationScriptTests/InstallationScriptTests.json: expected <value> but got <> at input token 1
<<>> { "sdk" : { "version" : "1.0.0-beta.19463.3" } }
Current workaround is to strip these charecters using tool like sed sed '1s/^\xEF\xBB\xBF//' "$json_file" | awk -f JSON.awk - | .....
It would be nice if parser ignores these BOM characters so consumer do not need to strip them.
When parsing a JSON file with BOM such as:
https://github.com/dotnet/toolset/blob/40cc5860e2ef311b9aca733b1d2eccaa681bd422/TestAssets/InstallationScriptTests/InstallationScriptTests.json
JSON.awk gives the following error:
Current workaround is to strip these charecters using tool like sed
sed '1s/^\xEF\xBB\xBF//' "$json_file" | awk -f JSON.awk - | .....It would be nice if parser ignores these BOM characters so consumer do not need to strip them.