Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parser): handle UTF-8 BOM in JSON input #1065

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

thevilledev
Copy link
Contributor

Strip UTF-8 BOM (byte order mark) from JSON input before parsing, allowing
users to directly use files containing BOM with conftest. Matches OPA's
implementation at open-policy-agent/opa#6989.

Fixes #862

Strip UTF-8 BOM (byte order mark) from JSON input before parsing, allowing
users to directly use files containing BOM with conftest. Matches OPA's
implementation.

Signed-off-by: Ville Vesilehto <[email protected]>
Copy link
Member

@jalseth jalseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@jalseth jalseth merged commit 5decd18 into open-policy-agent:master Feb 15, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

conftest read json file failed due to json file contains BOM
2 participants