Skip to content

fix!: fixed invalid json passing as valid json#32

Merged
TomAFrench merged 2 commits intomainfrom
zw/fix-issue-30
Feb 13, 2025
Merged

fix!: fixed invalid json passing as valid json#32
TomAFrench merged 2 commits intomainfrom
zw/fix-issue-30

Conversation

@zac-williamson
Copy link
Collaborator

Description

Certain invalid JSON was passing as valid

Problem*

resolves issue 30
#30

Summary*

If JSON ended with a partial string, numeric or literal the parser was not flagging this as invalid JSON

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench TomAFrench requested a review from kashbrti February 5, 2025 18:11
scan_mode = scan_token;
}

// if we end in a scan mode where we're searching for a number, string or a literal (true/false/null), we have an incomplete token and this is invalid JSON
Copy link
Contributor

Choose a reason for hiding this comment

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

this makes sense

@TomAFrench TomAFrench merged commit cfb29f8 into main Feb 13, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants