1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

Modifies XML output to be handled the same for a native java array as well as a JSONArray.

This commit is contained in:
John J. Aylward 2015-10-26 18:17:37 -04:00
parent e7f4eb5f67
commit 91c6f09be8

View file

@ -406,8 +406,11 @@ public class XML {
value = jo.opt(key); value = jo.opt(key);
if (value == null) { if (value == null) {
value = ""; value = "";
}else if(value.getClass().isArray()){
value = new JSONArray(value);
} }
string = value instanceof String ? (String)value : null; string = value instanceof String ? (String)value : null;
// Emit content in body // Emit content in body