| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ of this software and associated documentation files (the "Software"), to deal | |||
| 31 | 31 | * This provides static methods to convert an XML text into a JSONObject, | |
| 32 | 32 | * and to covert a JSONObject into an XML text. | |
| 33 | 33 | * @author JSON.org | |
| 34 | - * @version 2011-01-13 | ||
| 34 | + * @version 2011-02-11 | ||
| 35 | 35 | */ | |
| 36 | 36 | public class XML { | |
| 37 | 37 | ||
@@ -313,6 +313,9 @@ public static Object stringToValue(String string) { | |||
| 313 | 313 | if (string.equalsIgnoreCase("null")) { | |
| 314 | 314 | return JSONObject.NULL; | |
| 315 | 315 | } | |
| 316 | + if (string.equals("0")) { | ||
| 317 | + return new Integer(0); | ||
| 318 | + } | ||
| 316 | 319 | ||
| 317 | 320 | // If it might be a number, try converting it. If that doesn't work, | |
| 318 | 321 | // return the string. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments