mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 19:15:27 -04:00
attribute="0"
This commit is contained in:
parent
80e3312acd
commit
dced076cd4
5
XML.java
5
XML.java
@ -31,7 +31,7 @@ import java.util.Iterator;
|
|||||||
* This provides static methods to convert an XML text into a JSONObject,
|
* This provides static methods to convert an XML text into a JSONObject,
|
||||||
* and to covert a JSONObject into an XML text.
|
* and to covert a JSONObject into an XML text.
|
||||||
* @author JSON.org
|
* @author JSON.org
|
||||||
* @version 2011-01-13
|
* @version 2011-02-11
|
||||||
*/
|
*/
|
||||||
public class XML {
|
public class XML {
|
||||||
|
|
||||||
@ -313,6 +313,9 @@ public class XML {
|
|||||||
if (string.equalsIgnoreCase("null")) {
|
if (string.equalsIgnoreCase("null")) {
|
||||||
return JSONObject.NULL;
|
return JSONObject.NULL;
|
||||||
}
|
}
|
||||||
|
if (string.equals("0")) {
|
||||||
|
return new Integer(0);
|
||||||
|
}
|
||||||
|
|
||||||
// If it might be a number, try converting it. If that doesn't work,
|
// If it might be a number, try converting it. If that doesn't work,
|
||||||
// return the string.
|
// return the string.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user