mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
attribute="0"
This commit is contained in:
parent
80e3312acd
commit
dced076cd4
1 changed files with 4 additions and 1 deletions
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…
Add table
Add a link
Reference in a new issue