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:
parent
e7f4eb5f67
commit
91c6f09be8
1 changed files with 3 additions and 0 deletions
3
XML.java
3
XML.java
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue