mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 10:45:23 +08:00
hygiene
This commit is contained in:
@@ -32,7 +32,7 @@ import java.util.Iterator;
|
|||||||
* JSONObject, and to covert a JSONArray or JSONObject into an XML text using
|
* JSONObject, and to covert a JSONArray or JSONObject into an XML text using
|
||||||
* the JsonML transform.
|
* the JsonML transform.
|
||||||
* @author JSON.org
|
* @author JSON.org
|
||||||
* @version 2011-10-03
|
* @version 2011-10-04
|
||||||
*/
|
*/
|
||||||
public class JSONML {
|
public class JSONML {
|
||||||
|
|
||||||
@@ -442,12 +442,12 @@ public class JSONML {
|
|||||||
if (object != null) {
|
if (object != null) {
|
||||||
if (object instanceof String) {
|
if (object instanceof String) {
|
||||||
sb.append(XML.escape(object.toString()));
|
sb.append(XML.escape(object.toString()));
|
||||||
} else if (object instanceof Number) {
|
|
||||||
sb.append(object.toString());
|
|
||||||
} else if (object instanceof JSONObject) {
|
} else if (object instanceof JSONObject) {
|
||||||
sb.append(toString((JSONObject)object));
|
sb.append(toString((JSONObject)object));
|
||||||
} else if (object instanceof JSONArray) {
|
} else if (object instanceof JSONArray) {
|
||||||
sb.append(toString((JSONArray)object));
|
sb.append(toString((JSONArray)object));
|
||||||
|
} else {
|
||||||
|
sb.append(object.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user