Skip to content

Conversation

@edsavage
Copy link
Contributor

@edsavage edsavage commented Jan 26, 2026

Various changes to the handling of errors when parsing JSON state documents to improve consistency and provide better visibility

Relates #2875

Various changes to the handling of errors when parsing JSON state documents to improve consistency and provide better visibility
@prodsecmachine
Copy link

prodsecmachine commented Jan 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@edsavage edsavage requested a review from valeriy42 January 26, 2026 03:33
Copy link
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

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

It looks mostly good. I have just a few minor comments.

message = "Encountered NULL character in stream before parsing has started.";
ret = false;
}
if (m_Reader->handler().s_Type == SBoostJsonHandler::E_TokenObjectEnd) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since both if statements could be true, you would potentially reassign message. I guess it should be either else if here, or the messages should be concatenated.

Copy link
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

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

LGTM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants