mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-07 03:06:03 +08:00
attribute="0"
This commit is contained in:
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,
|
||||
* and to covert a JSONObject into an XML text.
|
||||
* @author JSON.org
|
||||
* @version 2011-01-13
|
||||
* @version 2011-02-11
|
||||
*/
|
||||
public class XML {
|
||||
|
||||
@@ -313,6 +313,9 @@ public class XML {
|
||||
if (string.equalsIgnoreCase("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,
|
||||
// return the string.
|
||||
|
Reference in New Issue
Block a user