-
Notifications
You must be signed in to change notification settings - Fork 67
[ML] Better handling of invalid JSON state documents #2895
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
base: main
Are you sure you want to change the base?
Conversation
Various changes to the handling of errors when parsing JSON state documents to improve consistency and provide better visibility
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
valeriy42
left a comment
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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.
valeriy42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Various changes to the handling of errors when parsing JSON state documents to improve consistency and provide better visibility
Relates #2875