-
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
XML.toJSONObject interprets certain strings as infinite numbers #27
Comments
I just realized that I used an older version of Probably this problem is already fixed with the newer version. |
Thanks. Please try it now. |
I have the following section in my XML document: I am getting the exact same error. How did you fix this? |
Please open a new issue with a fresh example. Preferably include the actual XML that is causing the problem, or at a minimum, a subsection of the XML that exhibits the problem. |
Take the following XML snippet as an example.
the
playlist
elements have id's that are hexadecimal strings.in
<playlist id="50617274792e78737066" name="Party"/>
the id can also be interpreted as an exponential number. This makes the conversion of this snippet fail with the message:org.json.JSONException: JSON does not allow non-finite numbers
I don't know if there is a way to tell the difference between a number and a string from XML but I think the problem could be avoided if instead of throwing an exception the implementation interprets the infinite number as a string in any case.
The text was updated successfully, but these errors were encountered: