-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Looking at strange code #58196
Looking at strange code #58196
Conversation
@@ -72,7 +71,7 @@ namespace JSONUtils | |||
} | |||
else | |||
{ | |||
pos = find_first_symbols<opening_bracket, closing_bracket, '\\', '"'>(pos, in.buffer().end()); | |||
pos = find_first_symbols<opening_bracket, closing_bracket, '"'>(pos, in.buffer().end()); |
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.
JSON cannot contain a backslash outside of a string literal.
else if (*pos == '"') | ||
{ | ||
quotes = true; | ||
++pos; | ||
} | ||
|
||
if (balance == 0) | ||
if (!quotes && balance == 0) |
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.
If the string literal just started, it does not mean the row can end there.
This is an automated comment for commit 6bb181c with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
@Avogar, I'm not fully confident about these changes, but as all tests have passed, and they look logical anyway, I will merge. But I would appreciate double-checking from you. |
Changelog category (leave one):