fix: toJson 직렬화 시 빈 항목 제외 처리

itemPart가 비어있을 경우 구분자와 내용을 출력하지 않도록 수정.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curry772
2026-04-21 09:08:31 +09:00
parent ffb1c69855
commit 6f5af2ac69
@@ -783,12 +783,15 @@ public class StandardItem implements Serializable, Cloneable {
if(p>0) sb.append(",");
sb.append("{");
while(keyIter.hasNext()) {
if(ai>0) sb.append(",");
String key = keyIter.next();
StandardItem item = group.get(key);
if(showPretty) sb.append("\n");
sb.append(item.toJson(showPretty, withBizData));
ai++;
String itemPart = item.toJson(showPretty, withBizData);
if(StringUtils.isNotEmpty(itemPart)) {
if(ai>0) sb.append(",");
if(showPretty) sb.append("\n");
sb.append(itemPart);
ai++;
}
}
if(showPretty) {