-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Problem with optLong, getLong when parsing JSONObject and XML #868
Comments
The code has been reverted in release |
After reading most of the past issues and doing a few local tests, I'm a bit confused to what the real issue currently is. Would it be possible to define a reproducible test case and an expectation? Sorry if I can't really see where the issue is. Thank you |
@rikkarth Agreed, disallowing leading zeros for numbers may have resolved the problem. Leaving this issue open in case anyone runs into a similar problem in the future. |
This issue tracks the history and next steps for some recent issues and PRs concerning different handling for optLong and getLong in JSONObject and XML.
#653 noted that JSONObject optLong() and getLong() have different behaviors.
#783 fixed the JSONObject issue in #653.
#790 was added to discuss a similar problem in XML parsing.
#794 fixed the XML issue in #790.
#826 raised an issue that there were problems with the change to JSONObject (see #653 and #783)
#852 raised an issue that there were problems with the change to XML (see #790 and #794)
#661 was another attempt at fixing #653. It was ultimately not accepted, but illustrates the difficulty in getting the expected behavior.
There was insufficient care in the code review to ensure the changes had no unintended side effects. Also, these behavior changes should probably have been opt-in via a configuration object, rather than made unilaterally for all users.
The changes in #783 and #794 will be reverted. At some future time, we should address this issue again, but without the side effects.
#814 will be reverted as well (see #813), since it touches code that is being reverted.
The text was updated successfully, but these errors were encountered: