Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add fix for issue #357 - strick parsing of null, true and false keywords #367

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

Open
abhisheks-gh wants to merge 1 commit into json-iterator:master
base: master
Choose a base branch
Loading
from abhisheks-gh:fix/357-strict-null-true-false-parsing

Conversation

@abhisheks-gh
Copy link

@abhisheks-gh abhisheks-gh commented Jan 1, 2026

This PR enforces strict JSON parsing for the null, true, and false keywords.

It fixes cases where the parser would accept invalid literals such as "nope",
"t123", or "fxxxx" by reading the first token and blindly skipping the remaining
bytes using skipFixedBytes().

The change updates readNull() and readBoolean() to validate exact keyword bytes
and fixes their usage across switch cases to avoid partial or incorrect matches.

Copy link
Author

Hi @svobol13 , could you please review this MR? It's a fix for issue #357.
Thanks.

Copy link
Author

Hey @taowen / @elifarley / @based2 / @plokhotnyuk, can someone review any approve my MR? Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /