mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
change length comparison to isEmpty method
This commit is contained in:
@@ -178,7 +178,7 @@ public class JSONML {
|
||||
newjo.accumulate(attribute, "");
|
||||
}
|
||||
}
|
||||
if (arrayForm && newjo.length() > 0) {
|
||||
if (arrayForm && !newjo.isEmpty()) {
|
||||
newja.put(newjo);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public class JSONML {
|
||||
"' and '" + closeTag + "'");
|
||||
}
|
||||
tagName = null;
|
||||
if (!arrayForm && newja.length() > 0) {
|
||||
if (!arrayForm && !newja.isEmpty()) {
|
||||
newjo.put("childNodes", newja);
|
||||
}
|
||||
if (ja == null) {
|
||||
|
||||
Reference in New Issue
Block a user