Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dced076

Browse filesBrowse files
attribute="0"
1 parent 80e3312 commit dced076
Copy full SHA for dced076

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎XML.java‎

Copy file name to clipboardExpand all lines: XML.java
+4-1Lines changed: 4 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.