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,9 +406,12 @@ public class XML {
|
|||
value = jo.opt(key);
|
||||
if (value == null) {
|
||||
value = "";
|
||||
}else if(value.getClass().isArray()){
|
||||
value = new JSONArray(value);
|
||||
}
|
||||
string = value instanceof String ? (String)value : null;
|
||||
|
||||
|
||||
// Emit content in body
|
||||
|
||||
if ("content".equals(key)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue