You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The boolean isInitial = x.getPrevious() == 0; check can behave in an unexpected way, for example:
JSONParserConfiguration strict = new JSONParserConfiguration().withStrictMode();
JSONTokener tok = new JSONTokener("[]xxx");
// Calling next+back changes "previous"; without these calls the check is performed:
tok.next();
tok.back();
JSONArray a1 = new JSONArray(tok, strict); // No error here, but should be because of extra chars?
This is a far corner case I think, but should be fixed if practical.
Is there a way to capture this in the JSONTokener object?
The text was updated successfully, but these errors were encountered:
From #927:
The boolean isInitial = x.getPrevious() == 0; check can behave in an unexpected way, for example:
JSONParserConfiguration strict = new JSONParserConfiguration().withStrictMode();
JSONTokener tok = new JSONTokener("[]xxx");
// Calling next+back changes "previous"; without these calls the check is performed:
tok.next();
tok.back();
JSONArray a1 = new JSONArray(tok, strict); // No error here, but should be because of extra chars?
This is a far corner case I think, but should be fixed if practical.
Is there a way to capture this in the JSONTokener object?
The text was updated successfully, but these errors were encountered: