Skip to content

Commit dced076

Browse files
attribute="0"
1 parent 80e3312 commit dced076

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

XML.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ of this software and associated documentation files (the "Software"), to deal
3131
* This provides static methods to convert an XML text into a JSONObject,
3232
* and to covert a JSONObject into an XML text.
3333
* @author JSON.org
34-
* @version 2011-01-13
34+
* @version 2011-02-11
3535
*/
3636
public class XML {
3737

@@ -313,6 +313,9 @@ public static Object stringToValue(String string) {
313313
if (string.equalsIgnoreCase("null")) {
314314
return JSONObject.NULL;
315315
}
316+
if (string.equals("0")) {
317+
return new Integer(0);
318+
}
316319

317320
// If it might be a number, try converting it. If that doesn't work,
318321
// return the string.

0 commit comments

Comments
 (0)