Skip to content

Conversation

IlCommittatore
Copy link

Purpose

Hello! I think this pull request could fix the issue with the id : #2769.
Closes #2769

Copy link

google-cla bot commented Dec 2, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@IlCommittatore IlCommittatore force-pushed the main branch 6 times, most recently from f64791e to 6f3eb79 Compare December 3, 2024 10:54
@Marcono1234
Copy link
Contributor

Thanks a lot for these changes!

I am a bit concerned that tweaking lenient parsing like this could have undesired side-effects for other use cases. As mentioned in #2769 (comment), the proper solution might be if users explicitly added a separator between values when writing them to avoid ambiguities during parsing (see also #2783).

However, I will leave this pull request open and let the direct project members decide since they might have a different opinion on this.

while (true) {
for (; pos + i < limit; i++) {
switch (buffer[pos + i]) {
case '"':
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe for consistency it would also be necessary to change JsonReader#skipUnquotedValue so that reading a value and skipping a value is consistent, and adding a test for this.

Not sure if JsonReader#isLiteral would have to be changed as well, maybe not.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JsonReader with strictness set to LENIENT,

2 participants